From:             voxus at mail dot ru
Operating system: Gentoo Linux
PHP version:      5.0.5
PHP Bug Type:     Reproducible crash
Bug description:  segmentation fault on object serialize

Description:
------------
php is crashing when trying to serialize any given object.  
  
problem is reproducible on x86_64 arch (known to be ok on  
x86 with any sane CFLAGS) with php-5.0.5 (5.0.4 is ok),  
for example - AMD Athlon(tm) 64 Processor 3200+.  
  
recompilation with CFLAGS="-O0" or with debug symbols 
"solves" the problem.  

Reproduce code:
---------------
compile php with CFLAGS="-O2" (yes, nothing more here)

execute from cli:

        class foo
        {
                public function bah()
                {
                        var_dump(serialize($this));
                }
        }

        $foo = new foo();
        $foo->bah();


Expected result:
----------------
var_dump'ed serialized object, i.e. - just string  

Actual result:
--------------
segmentation fault.  
  
backtrace from php: 
 
(gdb) bt 
#0  0x00000037ecf6fb9b in memcpy () from /lib/libc.so.6 
#1  0x000000000053c8ed in zif_var_export () 
#2  0x000000000053e419 in php_var_serialize () 
#3  0x000000000053e4d6 in zif_serialize () 
#4  0x00000000005c76cb in zend_do_fcall_common_helper () 
#5  0x00000000005c7941 in zend_do_fcall_handler () 
#6  0x00000000005bad54 in execute () 
#7  0x00000000005c721e in zend_do_fcall_common_helper () 
#8  0x00000000005bad54 in execute () 
#9  0x0000000000597806 in zend_execute_scripts () 
#10 0x000000000055e379 in php_execute_script () 
#11 0x00000000005d1779 in main () 
 

-- 
Edit bug report at http://bugs.php.net/?id=34435&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34435&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34435&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34435&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34435&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34435&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34435&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34435&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34435&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34435&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34435&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34435&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34435&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34435&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34435&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34435&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34435&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34435&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34435&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34435&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34435&r=mysqlcfg

Reply via email to