Bug #17945: (inifinitive) recursive function call causes segmentation fault
| From: | tilman dot giese at globalview dot de | Date: | Mon, 24 Jun 2002 13:21:20 +0000 |
| Subject: | Bug #17945: (inifinitive) recursive function call causes segmentation fault | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-11909@lists.php.net to get a copy of this message | ||
From: tilman.giese@globalview.de
Operating system: SuSE Linux 7.3
PHP version: 4.2.1
PHP Bug Type: Reproducible crash
Bug description: (inifinitive) recursive function call causes segmentation fault
I wrote a class with a function to add a key to an assoziative array.
Unfortunately, I got an infinite loop when changing function names.
Therefore, I got a segmentation fault in apache. The function looks like
this:
function setAttribute($name, $value) {
if (array_key_exists($name, $this->cfgAttributes) && trim($value)) {
return $this->setAttribute($this->cfgAttributes[$name],
$this->encode($value));
} else return false;
}
The reproducible segmentation fault looks like:
#0 0x400f4ae5 in chunk_free () from /lib/libc.so.6
#1 0x400f49a3 in free () from /lib/libc.so.6
#2 0x40322a9c in shutdown_memory_manager (silent=1, clean_cache=0) at
zend_alloc.c:468
#3 0x403490b5 in php_request_shutdown (dummy=0x0) at main.c:794
#4 0x40345b93 in apache_php_module_main (r=0x814b0e8,
display_source_mode=0) at sapi_apache.c:96
#5 0x403466ff in send_php (r=0x814b0e8, display_source_mode=0,
filename=0x0) at mod_php4.c:575
#6 0x40346763 in send_parsed_php (r=0x814b0e8) at mod_php4.c:590
#7 0x08056819 in ap_invoke_handler ()
#8 0x0806d1bf in process_request_internal ()
#9 0x0806d232 in ap_process_request ()
#10 0x080638a6 in child_main ()
#11 0x08063a85 in make_child ()
#12 0x08063c06 in startuo_children ()
#13 0x080642ad in standalone_main ()
#14 0x08064b3c in main ()
#15 0x4009d7ee in __libc_start_main () from /lib/libc.so.6
I solved the problem because it was only a spelling mistake, but php
should not produce a segmentation fault, does not it?
Tilman
--
Edit bug report at http://bugs.php.net/?id=17945&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17945&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17945&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17945&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17945&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17945&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17945&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17945&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17945&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17945&r=globals