From:             daniel dot goss at t-systems dot com
Operating system: RedHat 8.0, 7.3
PHP version:      4.3.2
PHP Bug Type:     Reproducible crash
Bug description:  A stack overflow in a php-script leads to a segmentation fault.

Description:
------------
I know this bug has been reported as "Bug #18909: Stack overflow error"
but I think this should be fixed and not treated as bogus like in bug
#18909.
Scripting engines should _never_ segfault!

A stack overflow in a recursive php-function leads the php-engine to a
segmentation fault.

There is a second issue that could be in associated with this one. If a
function is called very often (sometimes recoursive - depth not greater
than 20) php crashes too. We've not investigated this issue further enough
to write a script to reproduce this behaviour.

Reproduce code:
---------------
<?
  function MyTest($A, $B, $C, $D, $E, $F, $G)
  {
        for ($k=0; $k<100; $k++)
    {
            echo "|".$A++."|<BR>";
          flush();    
                MyTest($A, "", "", "", "", "", "");
    }
  }
  
  MyTest(0,"","","","","","");
?>


Expected result:
----------------
A php error complaining about a stack overflow.

Actual result:
--------------
[notice] child pid 29029 exit signal Segmentation fault (11)

-- 
Edit bug report at http://bugs.php.net/?id=24578&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24578&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24578&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24578&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24578&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24578&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24578&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24578&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24578&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24578&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24578&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24578&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24578&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24578&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24578&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24578&r=gnused

Reply via email to