#40765 [Opn->Fbk]: calling backtrace inside nested static class functions causes segfault

From: Date: Fri, 09 Mar 2007 12:36:22 +0000
Subject: #40765 [Opn->Fbk]: calling backtrace inside nested static class functions causes segfault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-110138@lists.php.net to get a copy of this message
ID: 40765 Updated by: tony2001@php.net Reported By: nd0 at gmx dot de -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: linux debian PHP Version: 5.2.1 New Comment: Cannot reproduce. Please make sure you've disabled all zend_extensions like Zend Optimizer, APC, Xdebug, ionCube etc. Previous Comments: ------------------------------------------------------------------------ [2007-03-09 12:29:45] nd0 at gmx dot de new email ------------------------------------------------------------------------ [2007-03-09 12:20:28] nd0 at gmx dot de 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 this bug report at http://bugs.php.net/?id=40765&edit=1

« previous php.bugs (#110138) next »