Bug #2812: Crash in function_exists()

From: Date: Wed, 24 Nov 1999 00:53:24 +0000
Subject: Bug #2812: Crash in function_exists()
Groups: php.dev 
Request: Send a blank email to php-dev+get-13032@lists.php.net to get a copy of this message
From: christophe.massiot@mail.dotcom.fr Operating system: Debian slink/Linux 2.2.12 PHP version: 3.0.12 PHP Bug Type: Reproduceable crash Bug description: Crash in function_exists() 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.

« previous php.dev (#13032) next »