ID:               40765
 User updated by:  nd0 at gmx dot de
-Reported By:      ndroege at bimp dot de
+Reported By:      nd0 at gmx dot de
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: linux debian
 PHP Version:      5.2.1
 New Comment:

new email


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to