php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32874 Circular call leeds to segmentation fault
Submitted: 2005-04-28 20:28 UTC Modified: 2005-04-28 21:02 UTC
From: mbm at interflow dot dk Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.0.4 OS: Multiple OS
Private report: No CVE-ID: None
 [2005-04-28 20:28 UTC] mbm at interflow dot dk
Description:
------------
Recursively calling two functions in a class leads to a segmentation fault.

Reproduce code:
---------------
class SegFault {

  public function call(){
    $this->back();
  }

  public function back(){
    $this->call();
  }
}
$seg = new SegFault();
$seg->Call();


Expected result:
----------------
I'd expect some kind of error when php runs out of buffer for the callstack - this function clearly is an example of bad code in the script - however php shouldnt die by segmentation fault.


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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-28 21:02 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: Fri Apr 19 03:01:27 2024 UTC