[php-maint] Bug#401129: [m68k] FTBFS due to alignment problem
Roman Zippel
zippel at linux-m68k.org
Fri Dec 1 01:57:10 CET 2006
Package: php5
Severity: important
Tags: patch
Hi,
php5 currently fails to compile because it crashes in the allocator. The
basic problem is, that the used alignment is to small. The allocator
needs two bits for type information, but the alignment is set to two on
m68k. The attached patch fixes the problem and also properly rounds the
alignment value up, so it matches the shift value (it's not really a
problem right now, but just in case the sizeof a few lines up produces
weird results).
bye, Roman
-- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: m68k
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-m68k-amiga
Locale: LANG=de_DE.UTF-8, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
-------------- next part --------------
Index: php5-5.2.0/Zend/Zend.m4
===================================================================
--- php5-5.2.0.orig/Zend/Zend.m4 2006-11-30 13:34:32.000000000 +0100
+++ php5-5.2.0/Zend/Zend.m4 2006-11-30 13:59:01.000000000 +0100
@@ -268,17 +268,22 @@
int main()
{
- int i = ZEND_MM_ALIGNMENT;
+ int i, align;
int zeros = 0;
FILE *fp;
- while (i & ~0x1) {
- zeros++;
- i = i >> 1;
- }
+ i = ZEND_MM_ALIGNMENT - 1;
+ if (i > 3) {
+ while (i) {
+ zeros++;
+ i = i >> 1;
+ }
+ } else
+ zeros = 2;
+ align = 1 << zeros;
fp = fopen("conftest.zend", "w");
- fprintf(fp, "%d %d\n", ZEND_MM_ALIGNMENT, zeros);
+ fprintf(fp, "%d %d\n", align, zeros);
fclose(fp);
exit(0);
More information about the pkg-php-maint
mailing list