|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-06-24 09:25 UTC] mfischer@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 21:00:01 2025 UTC |
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