From: ndroege at bimp dot de Operating system: linux debian PHP version: 5.2.1 PHP Bug Type: Reproducible crash Bug description: calling backtrace inside nested static class functions causes segfault
Description: ------------ Testet on 5.2.0 and 5.2.1 I was able to reproduce segfaults in this situation on the commandline and with apache! Reproduce code: --------------- <?php class CrashHelper { function call2($tpl_var, $value = null) {} function call1($value = null) {} } class Crash { static function outerCall($param) { $ch = new CrashHelper(); # $test = Crash::innerCall($param); # $ch->call2('test', $test); // don't crash # $ch->call1(Crash::innerCall($param)); // don't crash $ch->call2('test', Crash::innerCall($param)); // crash } static function innerCall($param) { $backtrace = debug_backtrace(); echo '<pre>'.var_export($backtrace, true).'</pre>'; } } function doCrash($param) { # $ch = new CrashHelper(); # $ch->call2('test', Crash::innerCall($param)); // don't crash Crash::outerCall($param); } doCrash($_GET['id']); ?> Expected result: ---------------- backtrace, no crash Actual result: -------------- Speicherzugriffsfehler -- Edit bug report at http://bugs.php.net/?id=40765&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40765&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40765&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40765&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40765&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40765&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40765&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40765&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40765&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40765&r=support Expected behavior: http://bugs.php.net/fix.php?id=40765&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40765&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40765&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40765&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40765&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40765&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40765&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40765&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40765&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40765&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40765&r=mysqlcfg