From: aya at eh dot org Operating system: Linux PHP version: 5.3.0 PHP Bug Type: Reproducible crash Bug description: SEGV with zval_ptr_dtor
Description: ------------ It seems that zval_ptr_dtor doesn't check if strings are heap-allocated. Reproduce code: --------------- // Change this to zero to get a SEGV int heapAllocate = 1; // Make a string zval zval* v; MAKE_STD_ZVAL(v); ZVAL_STRING(v, "foo", heapAllocate); // SEGV happens here zval_ptr_dtor(&v); Expected result: ---------------- Nothing. Actual result: -------------- php-5.3.0/Zend/zend_execute_API.c(435) : Block 0x004014fa status: php-5.3.0/Zend/zend_variables.c(36) : Actual location (location was relayed) Invalid pointer: ((thread_id=0x74706972) != (expected=0x96F6B8A0)) -- Edit bug report at http://bugs.php.net/?id=49390&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49390&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49390&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49390&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49390&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49390&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49390&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49390&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49390&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49390&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49390&r=support Expected behavior: http://bugs.php.net/fix.php?id=49390&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49390&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49390&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49390&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49390&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49390&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49390&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49390&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49390&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49390&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49390&r=mysqlcfg