diff options
author | Dmitry Stogov <dmitry@php.net> | 2006-12-01 15:33:06 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2006-12-01 15:33:06 +0000 |
commit | 0742edb3969a92a710dc940ddb1d04be35e3cfe6 (patch) | |
tree | dc8a7847bcd4d96a09a4b033811e05b4714078f9 | |
parent | de9574e872111fb63ae96cde736ca98021836d63 (diff) | |
download | php-git-0742edb3969a92a710dc940ddb1d04be35e3cfe6.tar.gz |
Fixed bug #39702 (php crashes in the allocator on linux-m68k)
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | Zend/zend_alloc.c | 7 |
2 files changed, 8 insertions, 0 deletions
@@ -44,6 +44,7 @@ PHP NEWS php_filter.h). - Fixed wrong signature initialization in imagepng (Takeshi Abe) - Added optimization for imageline with horizontal and vertial lines (Pierre) +- Fixed bug #39702 (php crashes in the allocator on linux-m68k). (Dmitry) - Fixed bug #39673 (file_get_contents causes bus error on certain offsets). (Tony) - Fixed bug #39663 (Memory leak in pg_get_notify() and a possible memory diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 1166008099..cb14c3788b 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -373,6 +373,11 @@ struct _zend_mm_heap { #ifndef ZEND_MM_ALIGNMENT # define ZEND_MM_ALIGNMENT 8 # define ZEND_MM_ALIGNMENT_LOG2 3 +#elif ZEND_MM_ALIGNMENT < 4 +# undef ZEND_MM_ALIGNMENT +# undef ZEND_MM_ALIGNMENT +# define ZEND_MM_ALIGNMENT 4 +# define ZEND_MM_ALIGNMENT_LOG2 2 #endif #define ZEND_MM_ALIGNMENT_MASK ~(ZEND_MM_ALIGNMENT-1) @@ -587,6 +592,8 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_mem_handlers *handlers, #if 0 int i; + printf("ZEND_MM_ALIGNMENT=%d\n", ZEND_MM_ALIGNMENT); + printf("ZEND_MM_ALIGNMENT_LOG2=%d\n", ZEND_MM_ALIGNMENT_LOG2); printf("ZEND_MM_MIN_SIZE=%d\n", ZEND_MM_MIN_SIZE); printf("ZEND_MM_MAX_SMALL_SIZE=%d\n", ZEND_MM_MAX_SMALL_SIZE); printf("ZEND_MM_ALIGNED_HEADER_SIZE=%d\n", ZEND_MM_ALIGNED_HEADER_SIZE); |