php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40381 Segfault when function is called recursively
Submitted: 2007-02-07 08:12 UTC Modified: 2007-02-07 08:28 UTC
From: guus dot leeuw at guusleeuwit dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.0 OS: RedHat FC6 x64
Private report: No CVE-ID: None
 [2007-02-07 08:12 UTC] guus dot leeuw at guusleeuwit dot com
Description:
------------
Using the script below causes PHP to crash with a segfault. I would expect PHP to catch a recursion like this and report an error through php_error or some such.

Reproduce code:
---------------
<?php

class A {
        function last_error()
        {
                return $this->last_error();
        }
}

$a = new A();
echo $a->last_error();
exit(0);
?>


Expected result:
----------------
I expect an error along the lines of:
brk() problem when calling function last_error(). Cannot increase stack space.

Actual result:
--------------
Segmentation fault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-07 08:28 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 08:01:28 2024 UTC