From: sparkeh at btinternet dot com Operating system: Linux 2.6.7-gentoo-r9 PHP version: 5.0.1 PHP Bug Type: Reproducible crash Bug description: Segfault (11) / Possible stack corruption
Description: ------------ I've tried to get the code to the minimum required to cause a crash. The combination of the local variable being defined and the global reference seems to be causing stack corruption (the script never returns successfully from the function call: jelly can # php -f crash.php About to segfault : Segmentation fault jelly can # php -v PHP 5.0.1 (cli) (built: Aug 18 2004 12:39:38) Reproduce code: --------------- <? switch($t) { default: $rar = 0; function segfault() { global $moo; echo 'About to segfault : '; } segfault(); } ?> Expected result: ---------------- About to segfault : Actual result: -------------- About to segfault : Segmentation fault -- Edit bug report at http://bugs.php.net/?id=29735&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29735&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29735&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29735&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29735&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29735&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29735&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29735&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29735&r=support Expected behavior: http://bugs.php.net/fix.php?id=29735&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29735&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29735&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29735&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29735&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29735&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29735&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29735&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29735&r=float