php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47062 Segmentation fault running a class method
Submitted: 2009-01-10 19:49 UTC Modified: 2009-01-10 20:26 UTC
From: charpour at gnet dot gr Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.8 OS: Debian 4.0 Gnu/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: charpour at gnet dot gr
New email:
PHP Version: OS:

 

 [2009-01-10 19:49 UTC] charpour at gnet dot gr
Description:
------------
When running the code below, php crashes with a Segmentation fault.

(Found that by mistake)

Reproduce code:
---------------
<?php 
class SegFault {
	public function invalid() {
		return $this->invalid();
	}
}

$segfault = new SegFault();

$segfault->invalid();

?>

Expected result:
----------------
not to seg fault

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-10 19:56 UTC] charpour at gnet dot gr
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212028704 (LWP 11428)]
0x0828500c in zend_std_get_method (object_ptr=0xbf4a70f4, method_name=0xb7beaa3c "invalid", method_len=7)
    at /root/packages/php-5.2.8/Zend/zend_object_handlers.c:771
771  zend_str_tolower_copy(lc_method_name, method_name, method_len);
 [2009-01-10 20:26 UTC] felipe@php.net
As of 5.3 the segfault was fixed for infinite recursive calls.
Now we get:
"Fatal error: Allowed memory size of 134217728 bytes exhausted at /home/felipe/dev/php5/Zend/zend_execute.h:157 (tried to allocate 261900 bytes)"

but in 5.2 it's expected.


Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 12:01:32 2024 UTC