Edit report at https://bugs.php.net/bug.php?id=55764&edit=1

 ID:                 55764
 Updated by:         dmi...@php.net
 Reported by:        s...@php.net
 Summary:            Review ZEND_MM_LONG_CONST on 64 bit
-Status:             Assigned
+Status:             Feedback
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   All
 PHP Version:        trunk-SVN-2011-09-22 (SVN)
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

I think you are wrong.

zend_alloc works with pointers and size_t which have the same size as long on 
both 32-bit and 64-bit GCC.

Also size of "long" and "long long" is the same on 64-bit GCC.


Previous Comments:
------------------------------------------------------------------------
[2011-09-22 16:46:59] s...@php.net

Description:
------------
Pointed out by Hannes on #php.pecl is a comment in
http://pecl.php.net/bugs/bug.php?id=12821 by skatta72 at luukku dot
com as follows:

   "I think I found this one. It's a missing L in Zend/zend_alloc.c:

    define ZEND_MM_LONG_CONST(x)      (x##L)

    In 64bit system it should be

    define ZEND_MM_LONG_CONST(x)      (x##LL)

    I found with gdb that the size - variable was way off where
    freeing a memory block and the resulting pointer caused the seg
    fault. Since that change, no crashes.

    This is inside the Zend memory management code. I wouldn't be
    surprised if it causes many other problems that occur randomly
    with php on 64-bit platform."

Dmitry, can you review this?



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=55764&edit=1

Reply via email to