#24659 [Fbk-Opn]: Crash due to some internal memory corruption (?)
ID: 24659 User updated by: fujimura at wakhok dot ac dot jp Reported By: fujimura at wakhok dot ac dot jp -Status: Feedback +Status: Open Bug Type: Zend Engine 2 problem Operating System: Linux kernel-2.4.21 -PHP Version: 5.0.0b2-dev +PHP Version: 5CVS-2003-07-27 (dev) New Comment: Could not make the second one (set_exception_handler) crash. Please check it still happens in current CVS. yes, I try it ... not crash. Previous Comments: [2003-07-27 08:54:00] [EMAIL PROTECTED] Could not make the second one (set_exception_handler) crash. Please check it still happens in current CVS. [2003-07-18 00:36:26] [EMAIL PROTECTED] The second script crashes much earlier: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (runnable)] 0x40425fde in zend_hash_add_or_update (ht=0x80ded04, arKey=0x80ded24 \\sA@, nKeyLength=7, pData=0x0, nDataSize=4, pDest=0xbfffcd54, flag=1) at /usr/src/web/php/php5/Zend/zend_hash.c:238 238 INIT_DATA(ht, p, pData, nDataSize); (gdb) bt #0 0x40425fde in zend_hash_add_or_update (ht=0x80ded04, arKey=0x80ded24 \\sA@, nKeyLength=7, pData=0x0, nDataSize=4, pDest=0xbfffcd54, flag=1) at /usr/src/web/php/php5/Zend/zend_hash.c:238 #1 0x404271f4 in zend_hash_copy (target=0x80ded04, source=0x80de7e4, pCopyConstructor=0x4041fce4 zval_add_ref, tmp=0xbfffcda4, size=4) at /usr/src/web/php/php5/Zend/zend_hash.c:750 #2 0x4041fde6 in _zval_copy_ctor (zvalue=0x80f160c) at /usr/src/web/php/php5/Zend/zend_variables.c:124 #3 0x4042b068 in zif_set_exception_handler (ht=1, return_value=0x80f160c, this_ptr=0x0, return_value_used=0) at /usr/src/web/php/php5/Zend/zend_builtin_functions.c:1017 #4 0x40451d4f in zend_do_fcall_common_helper (execute_data=0xbfffcf5c, op_array=0x80ea62c) at /usr/src/web/php/php5/Zend/zend_execute.c:2634 #5 0x404523f4 in zend_do_fcall_handler (execute_data=0xbfffcf5c, op_array=0x80ea62c) at /usr/src/web/php/php5/Zend/zend_execute.c:2763 #6 0x4043a7ee in execute (op_array=0x80ea62c) at /usr/src/web/php/php5/Zend/zend_execute.c:1194 #7 0x4042190f in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/web/php/php5/Zend/zend.c:1017 #8 0x403ef2c5 in php_execute_script (primary_file=0xb288) at /usr/src/web/php/php5/main/main.c:1695 #9 0x4045c07e in apache_php_module_main (r=0x81bf684, display_source_mode=0) at /usr/src/web/php/php5/sapi/apache/sapi_apache.c:54 #10 0x4045cd00 in send_php (r=0x81bf684, display_source_mode=0, filename=0x0) at /usr/src/web/php/php5/sapi/apache/mod_php5.c:621 #11 0x4045cd6a in send_parsed_php (r=0x81bf684) at /usr/src/web/php/php5/sapi/apache/mod_php5.c:636 #12 0x8054f09 in ap_invoke_handler () #13 0x806b0cf in process_request_internal () #14 0x806b13a in ap_process_request () #15 0x8061916 in child_main () #16 0x8061af5 in make_child () #17 0x8061c76 in startup_children () #18 0x806230d in standalone_main () #19 0x8062b9c in main () #20 0x4016c9cb in __libc_start_main (main=0x80627d8 main, argc=3, argv=0xb6b4, init=0x804ed2c _init, fini=0x8082e64 _fini, rtld_fini=0x4000aea0 _dl_fini, stack_end=0xb6ac) at ../sysdeps/generic/libc-start.c:92 [2003-07-18 00:34:39] [EMAIL PROTECTED] The first script (that xml thing) does this after some reloads: Warning: xml_set_default_handler(): supplied resource is not a valid XML Parser resource in /www/apache-1.3.27/htdocs/exep.php on line 13 Warning: xml_parser_free(): supplied resource is not a valid XML Parser resource in /www/apache-1.3.27/htdocs/exep.php on line 15 Warning: Unknown list entry type in request shutdown (135138372) in Unknown on line 0 Given enough requests, (ab -n 1000 http://localhost/bug24658_a.php), it crashes: [Switching to Thread 1024 (runnable)] 0x4042e1fd in zend_objects_destroy_object (object=0x80e907c, handle=1) at /usr/src/web/php/php5/Zend/zend_objects.c:36 36 zend_function *destructor = object-ce-destructor; (gdb) bt #0 0x4042e1fd in zend_objects_destroy_object (object=0x80e907c, handle=1) at /usr/src/web/php/php5/Zend/zend_objects.c:36 #1 0x40430855 in zend_objects_store_del_ref (zobject=0x80e0f9c) at /usr/src/web/php/php5/Zend/zend_objects_API.c:142 #2 0x4041fccc in _zval_dtor (zvalue=0x80e0f9c) at /usr/src/web/php/php5/Zend/zend_variables.c:61 #3 0x40417389 in _zval_ptr_dtor (zval_ptr=0x80ecff0) at /usr/src/web/php/php5/Zend/zend_execute_API.c:344 #4 0x40426be8 in zend_hash_destroy (ht=0x404a6990) at /usr/src/web/php/php5/Zend/zend_hash.c:509 #5 0x40416f55 in shutdown_executor () at /usr/src/web/php/php5/Zend/zend_execute_API.c:211 #6 0x40421257 in zend_deactivate () at /usr/src/web/php/php5/Zend/zend.c:795 #7 0x403ee8e6 in php_request_shutdown (dummy=0x0
#24801 [Csd-Opn]: xml_call_handler() causes segmentation fault
ID: 24801 User updated by: fujimura at wakhok dot ac dot jp Reported By: fujimura at wakhok dot ac dot jp -Status: Closed +Status: Open Bug Type: XML related Operating System: Linux kernel-2.4.21 -PHP Version: 5CVS-2003-07-25 (dev) +PHP Version: 5CVS-2003-07-28 (dev) New Comment: This bug has been fixed in CVS. I found another bug. xml_call_handler() causes...but I think it is different my first report. reproduce code: ?php class Handler { public function startElement() { } public function endElement() { } } $parser = xml_parser_create(); $handler = new Handler(); xml_set_element_handler($parser, array($handler, startElement), array($handler, endElement)); xml_parse($parser, ?xml version=\1.0\?root /, true) OR die(xml_error_string(xml_get_error_code($parser))); xml_parser_free($parser); ? actual: Segmentation Fault bt: [EMAIL PROTECTED] public_html]$ gdb php GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-slackware-linux... (gdb) run xml_parse.php Starting program: /usr/local/bin/php xml_parse.php Program received signal SIGSEGV, Segmentation fault. 0x081f8926 in _zend_is_inconsistent (ht=0x5a5a5a5a, file=0x8278880 /home/fujimura/php-src/Zend/zend_hash.c, line=940) at /home/fujimura/php-src/Zend/zend_hash.c:53 53 if (ht-inconsistent==HT_OK) { (gdb) bt #0 0x081f8926 in _zend_is_inconsistent (ht=0x5a5a5a5a, file=0x8278880 /home/fujimura/php-src/Zend/zend_hash.c, line=940) at /home/fujimura/php-src/Zend/zend_hash.c:53 #1 0x081fae4d in zend_hash_index_find (ht=0x5a5a5a5a, h=0, pData=0xbfffcc8c) at /home/fujimura/php-src/Zend/zend_hash.c:940 #2 0x081ab3f6 in xml_call_handler (parser=0x404367a8, handler=0x40436eb0, function_ptr=0x0, argc=2, argv=0xbfffccd8) at /home/fujimura/php-src/ext/xml/xml.c:415 #3 0x081ac077 in _xml_endElementHandler (userData=0x404367a8, name=0x830ca60 root) at /home/fujimura/php-src/ext/xml/xml.c:751 #4 0x081aec49 in _end_element_handler (user=0x40436874, name=0x830c9c8 root) at /home/fujimura/php-src/ext/xml/compat.c:128 #5 0x402443be in xmlParseExtParsedEnt () from /usr/lib/libxml2.so.2 #6 0x40244db1 in xmlParseChunk () from /usr/lib/libxml2.so.2 #7 0x081af1b8 in php_XML_Parse (parser=0x40436874, data=0x40436b3c ?xml version=\1.0\?root /, data_len=29, is_final=1) at /home/fujimura/php-src/ext/xml/compat.c:400 #8 0x081ad750 in zif_xml_parse (ht=3, return_value=0x40436c30, this_ptr=0x0, return_value_used=1) at /home/fujimura/php-src/ext/xml/xml.c:1319 #9 0x08215ec7 in zend_do_fcall_common_helper (execute_data=0xbfffd1e0, op_array=0x40435694) at /home/fujimura/php-src/Zend/zend_execute.c:2511 #10 0x082165ab in zend_do_fcall_handler (execute_data=0xbfffd1e0, op_array=0x40435694) at /home/fujimura/php-src/Zend/zend_execute.c:2644 #11 0x08211870 in execute (op_array=0x40435694) at /home/fujimura/php-src/Zend/zend_execute.c:1192 #12 0x081f3d94 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/fujimura/php-src/Zend/zend.c:1017 #13 0x081b4ef0 in php_execute_script (primary_file=0xb5e0) at /home/fujimura/php-src/main/main.c:1568 #14 0x0821e534 in main (argc=2, argv=0xb684) at /home/fujimura/php-src/sapi/cli/php_cli.c:910 #15 0x4030bbb4 in __libc_start_main () from /lib/libc.so.6 Previous Comments: [2003-07-27 15:33:53] [EMAIL PROTECTED] This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. [2003-07-25 03:51:18] fujimura at wakhok dot ac dot jp Description: ext/xml/xml.c:xml_call_handler() causes segmentation fault. Reproduce code: --- ?php function startElement() { } $parser = xml_parser_create(); xml_set_element_handler($parser, startElement, endElement); xml_parse($parser, ?xml version=\1.0\?root /, true) OR die(xml_error_string(xml_get_error_code($parser))); xml_parser_free($parser); ? Actual result: -- [EMAIL PROTECTED] public_html]$ gdb php GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you
#24801 [NEW]: xml_call_handler() causes segmentation fault
From: fujimura at wakhok dot ac dot jp Operating system: Linux kernel-2.4.21 PHP version: 5CVS-2003-07-25 (dev) PHP Bug Type: XML related Bug description: xml_call_handler() causes segmentation fault Description: ext/xml/xml.c:xml_call_handler() causes segmentation fault. Reproduce code: --- ?php function startElement() { } $parser = xml_parser_create(); xml_set_element_handler($parser, startElement, endElement); xml_parse($parser, ?xml version=\1.0\?root /, true) OR die(xml_error_string(xml_get_error_code($parser))); xml_parser_free($parser); ? Actual result: -- [EMAIL PROTECTED] public_html]$ gdb php GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-slackware-linux... (gdb) run xml_parse.php Starting program: /usr/local/bin/php xml_parse.php Program received signal SIGSEGV, Segmentation fault. 0x081e7e4c in _zval_ptr_dtor (zval_ptr=0xbfffc97c, __zend_filename=0x825e220 /home/fujimura/php-src/ext/xml/xml.c, __zend_lineno=423) at /home/fujimura/php-src/Zend/zend_execute_API.c:342 342 (*zval_ptr)-refcount--; (gdb) bt #0 0x081e7e4c in _zval_ptr_dtor (zval_ptr=0xbfffc97c, __zend_filename=0x825e220 /home/fujimura/php-src/ext/xml/xml.c, __zend_lineno=423) at /home/fujimura/php-src/Zend/zend_execute_API.c:342 #1 0x081ab079 in xml_call_handler (parser=0x40436988, handler=0x40436b7c, function_ptr=0x0, argc=2, argv=0xbfffc9b8) at /home/fujimura/php-src/ext/xml/xml.c:423 #2 0x081abc7e in _xml_endElementHandler (userData=0x40436988, name=0x830f550 root) at /home/fujimura/php-src/ext/xml/xml.c:753 #3 0x081ae851 in _end_element_handler (user=0x4042a0cc, name=0x830f410 root) at /home/fujimura/php-src/ext/xml/compat.c:128 #4 0x402443be in xmlParseExtParsedEnt () from /usr/lib/libxml2.so.2 #5 0x40244db1 in xmlParseChunk () from /usr/lib/libxml2.so.2 #6 0x081aedc0 in php_XML_Parse (parser=0x4042a0cc, data=0x40437200 ?xml version=\1.0\?root /, data_len=29, is_final=1) at /home/fujimura/php-src/ext/xml/compat.c:400 #7 0x081ad357 in zif_xml_parse (ht=3, return_value=0x40436c8c, this_ptr=0x0, return_value_used=1) at /home/fujimura/php-src/ext/xml/xml.c:1321 #8 0x08211156 in execute_internal (execute_data_ptr=0xbfffcdb0, return_value_used=1) at /home/fujimura/php-src/Zend/zend_execute.c:1143 #9 0x4074b276 in xdebug_execute_internal (current_execute_data=0xbfffcdb0, return_value_used=1) at /home/fujimura/xdebug-1.2.0/xdebug.c:782 #10 0x08215917 in zend_do_fcall_common_helper (execute_data=0xbfffcdb0, op_array=0x40435714) at /home/fujimura/php-src/Zend/zend_execute.c:2513 #11 0x08215feb in zend_do_fcall_handler (execute_data=0xbfffcdb0, op_array=0x40435714) at /home/fujimura/php-src/Zend/zend_execute.c:2642 #12 0x082112a8 in execute (op_array=0x40435714) at /home/fujimura/php-src/Zend/zend_execute.c:1192 #13 0x4074afcc in xdebug_execute (op_array=0x40435714) at /home/fujimura/xdebug-1.2.0/xdebug.c:750 #14 0x081f37d0 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/fujimura/php-src/Zend/zend.c:1017 #15 0x081b4af8 in php_execute_script (primary_file=0xb5f0) at /home/fujimura/php-src/main/main.c:1568 #16 0x0821dec8 in main (argc=2, argv=0xb694) at /home/fujimura/php-src/sapi/cli/php_cli.c:910 #17 0x4030bbb4 in __libc_start_main () from /lib/libc.so.6 -- Edit bug report at http://bugs.php.net/?id=24801edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24801r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24801r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24801r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24801r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24801r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24801r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=24801r=support Expected behavior: http://bugs.php.net/fix.php?id=24801r=notwrong Not enough info:http://bugs.php.net/fix.php?id=24801r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=24801r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24801r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24801r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24801r=dst IIS Stability: http://bugs.php.net/fix.php?id=24801r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=24801r=gnused
#24699 [NEW]: Memory Leak with per-class constants
From: fujimura at wakhok dot ac dot jp Operating system: Linux kernel-2.4.21 PHP version: 5CVS-2003-07-17 (dev) PHP Bug Type: Zend Engine 2 problem Bug description: Memory Leak with per-class constants Description: The per-class constant causes memory leaks used with builtin constants. configure line: ./configure \ --with-apxs=/usr/local/apache/bin/apxs \ --disable-short-tags \ --enable-versioning \ --enable-bcmath \ --enable-dio \ --enable-mbstring \ --enable-mbregex \ --enable-wddx \ --enable-dom \ --with-iconv \ --with-xsl \ --with-openssl \ --with-zlib \ --with-bz2 \ --enable-debug Reproduce code: --- [EMAIL PROTECTED] php-src]$ php -r 'class TEST { const FOO = SEEK_CUR; }' /home/user/php-src/Zend/zend_language_scanner.l() : Freeing 0x40435334 (9 bytes), script=- /home/user/php-src/Zend/zend_compile.c(2405) : Freeing 0x404352F0 (16 bytes), script=- -- Edit bug report at http://bugs.php.net/?id=24699edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24699r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24699r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24699r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24699r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24699r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24699r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=24699r=support Expected behavior: http://bugs.php.net/fix.php?id=24699r=notwrong Not enough info:http://bugs.php.net/fix.php?id=24699r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=24699r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24699r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24699r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24699r=dst IIS Stability: http://bugs.php.net/fix.php?id=24699r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=24699r=gnused
#24659 [Fbk-Opn]: Segmentation fault: xml_set_*_handler with object reference
ID: 24659 User updated by: fujimura at wakhok dot ac dot jp Reported By: fujimura at wakhok dot ac dot jp -Status: Feedback +Status: Open Bug Type: XML related Operating System: Linux kernel-2.4.21 -PHP Version: 5.0.0b1 +PHP Version: 5.0.0b2-dev New Comment: Add the PHP version, and a backtrace. The followed is php and Apache httpd version information, [EMAIL PROTECTED] bin]$ php -v PHP 5.0.0b2-dev (cli) (built: Jul 14 2003 16:52:50) Copyright (c) 1997-2003 The PHP Group Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies with Xdebug v1.2.0, Copyright (c) 2002, 2003, by Derick Rethans [EMAIL PROTECTED] bin]$ /usr/local/apache/bin/httpd -v Server version: Apache/1.3.27 (Unix) Server built: Jun 30 2003 06:57:35 [EMAIL PROTECTED] bin]$ /usr/local/apache/bin/httpd -V Server version: Apache/1.3.27 (Unix) Server built: Jun 30 2003 06:57:35 Server's Module Magic Number: 19990320:13 Server compiled with -D HAVE_MMAP -D HAVE_SHMGET -D USE_SHMGET_SCOREBOARD -D USE_MMAP_FILES -D HAVE_FCNTL_SERIALIZED_ACCEPT -D HAVE_SYSVSEM_SERIALIZED_ACCEPT -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D HARD_SERVER_LIMIT=256 -D HTTPD_ROOT=/usr/local/apache -D SUEXEC_BIN=/usr/local/apache/bin/suexec -D DEFAULT_PIDLOG=logs/httpd.pid -D DEFAULT_SCOREBOARD=logs/httpd.scoreboard -D DEFAULT_LOCKFILE=logs/httpd.lock -D DEFAULT_ERRORLOG=logs/error_log -D TYPES_CONFIG_FILE=conf/mime.types -D SERVER_CONFIG_FILE=conf/httpd.conf -D ACCESS_CONFIG_FILE=conf/access.conf -D RESOURCE_CONFIG_FILE=conf/srm.conf and backtrace. [EMAIL PROTECTED] root]# gdb /usr/local/apache/bin/httpd GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-slackware-linux... (gdb) run -X Starting program: /usr/local/apache/bin/httpd -X Program received signal SIGSEGV, Segmentation fault. 0x40316e8e in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so (gdb) bt #0 0x40316e8e in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so #1 0x4039fd80 in php5_module () from /usr/local/apache/libexec/libphp5.so #2 0x40318ba5 in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so #3 0x4030a687 in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so #4 0x403039dd in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so #5 0x4031059c in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so #6 0x40303771 in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so #7 0x4030b8de in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so #8 0x402df41f in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so #9 0x4032924e in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so #10 0x40329c83 in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so #11 0x40329e22 in svcauthdes_stats () from /usr/local/apache/libexec/libphp5.so #12 0x0806972f in ap_invoke_handler () #13 0x0807da8f in process_request_internal () #14 0x0807dea1 in ap_internal_redirect () #15 0x0805ec42 in handle_dir () #16 0x0806972f in ap_invoke_handler () #17 0x0807da8f in process_request_internal () #18 0x0807daee in ap_process_request () #19 0x08074dde in child_main () #20 0x08074f7e in make_child () #21 0x080750e4 in startup_children () #22 0x0807570f in standalone_main () #23 0x08075f2d in main () #24 0x400a4bb4 in __libc_start_main () from /lib/libc.so.6 Please try using this CVS snapshot: I updated php before the first reporting. What else could I do? Thanks. Previous Comments: [2003-07-15 13:35:45] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2003-07-15 04:25:49] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. Add the PHP version, and a backtrace
#24659 [NEW]: Segmentation fault: xml_set_*_handler with object reference
From: fujimura at wakhok dot ac dot jp Operating system: Linux kernel-2.4.21 PHP version: Irrelevant PHP Bug Type: XML related Bug description: Segmentation fault: xml_set_*_handler with object reference Description: The following code crashes(segmentation fault, and empty output) at a whim. But it does not reproduce when php invoked as CLI. Reproduce code: --- ?php class MyHandler { public function test($parser, $data) { print $data; } } $parser = xml_parser_create(); $parser AND die; $handler = new MyHandler(); xml_set_default_handler($parser, array($handler, test)); xml_parser_free($parser); ? Expected result: Nothing. Actual result: -- SIGSEGV logged to error_log. -- Edit bug report at http://bugs.php.net/?id=24659edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24659r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24659r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24659r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24659r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24659r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24659r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=24659r=support Expected behavior: http://bugs.php.net/fix.php?id=24659r=notwrong Not enough info:http://bugs.php.net/fix.php?id=24659r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=24659r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24659r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24659r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24659r=dst IIS Stability: http://bugs.php.net/fix.php?id=24659r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=24659r=gnused
#24659 [Opn]: Segmentation fault: xml_set_*_handler with object reference
ID: 24659 User updated by: fujimura at wakhok dot ac dot jp Reported By: fujimura at wakhok dot ac dot jp Status: Open Bug Type: XML related Operating System: Linux kernel-2.4.21 PHP Version: Irrelevant New Comment: -$parser AND die; +$parser OR die; ;-) Previous Comments: [2003-07-15 04:15:16] fujimura at wakhok dot ac dot jp Description: The following code crashes(segmentation fault, and empty output) at a whim. But it does not reproduce when php invoked as CLI. Reproduce code: --- ?php class MyHandler { public function test($parser, $data) { print $data; } } $parser = xml_parser_create(); $parser AND die; $handler = new MyHandler(); xml_set_default_handler($parser, array($handler, test)); xml_parser_free($parser); ? Expected result: Nothing. Actual result: -- SIGSEGV logged to error_log. -- Edit this bug report at http://bugs.php.net/?id=24659edit=1