php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2812 Crash in function_exists()
Submitted: 1999-11-24 01:53 UTC Modified: 1999-11-24 10:36 UTC
From: christophe dot massiot at mail dot dotcom dot fr Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.12 OS: Debian slink/Linux 2.2.12
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: christophe dot massiot at mail dot dotcom dot fr
New email:
PHP Version: OS:

 

 [1999-11-24 01:53 UTC] christophe dot massiot at mail dot dotcom dot fr
The following script :

<?
class toto {
  function titi() { }
}
$toto = new toto;
echo function_exists($toto->titi);
?>

generates a segmentation fault with the following backtrace :

Program received signal SIGSEGV, Segmentation fault.
0x8060a38 in _estrdup (s=0x0) at alloc.c:267
267             length = strlen(s)+1;
(gdb) bt
#0  0x8060a38 in _estrdup (s=0x0) at alloc.c:267
#1  0x8067b6c in php3_function_exists (ht=0x80da418, return_value=0x80b133c, 
    list=0x80c2380, plist=0x80c2340) at functions/basic_functions.c:2063
#2  0x80506b3 in phpparse () at control_structures_inline.h:934
#3  0x8059cc8 in php3_parse (yyin=0x80d3f20) at main.c:1553
#4  0x805a302 in main (argc=2, argv=0xbffff9a4) at main.c:1862

OK, I know it shouldn't do what I expect anyway, but it crashes...

NB : the bug doesn't occur under PHP4b3.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-24 10:36 UTC] thies at cvs dot php dot net
fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 01:01:30 2024 UTC