Re: memory corruption with 5.1?
| From: | James Crumpton | Date: | Fri, 08 Jul 2005 03:20:25 +0000 |
| Subject: | Re: memory corruption with 5.1? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-17186@lists.php.net to get a copy of this message | ||
Looks like libxml2-2.6.8 did the trick. Perhaps the version requirement for libxml2 should be bumped up for php5.1?
Also, it may or may not be worth noting that as of libxml2-2.6.18, I'm getting a segfault after the script has finished. 2.6.17 however, works fine.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 4947)]
0x4045d4f5 in _efree (ptr=0x838d02c)
at /home/james/php-5.1.0b2/Zend/zend_alloc.c:302 302 REMOVE_POINTER_FROM_LIST(p);(gdb) bt #0 0x4045d4f5 in _efree (ptr=0x838d02c)
at /home/james/php-5.1.0b2/Zend/zend_alloc.c:302#1 0x4046e723 in _zval_dtor_func (zvalue=0x838bcf8)
at /home/james/php-5.1.0b2/Zend/zend_variables.c:36#2 0x40468067 in destroy_op_array (op_array=0x8390e5c)
at /home/james/php-5.1.0b2/Zend/zend_variables.h:35#3 0x40475dc8 in zend_hash_destroy (ht=0x8374b80)
at /home/james/php-5.1.0b2/Zend/zend_hash.c:519#4 0x40467e96 in destroy_zend_class (pce=0x8374d7c)
at /home/james/php-5.1.0b2/Zend/zend_opcode.c:164#5 0x40475d20 in zend_hash_del_key_or_index (ht=0x80a4de8,
arKey=0x8374d90 "", nKeyLength=95, h=3763876606, flag=0)
at /home/james/php-5.1.0b2/Zend/zend_hash.c:490
#6 0x40476295 in zend_hash_reverse_apply (ht=0x80a4de8,
apply_func=0x40464b80 <is_not_internal_class>)
at /home/james/php-5.1.0b2/Zend/zend_hash.c:738
#7 0x4046507d in shutdown_executor ()
at /home/james/php-5.1.0b2/Zend/zend_execute_API.c:264#8 0x4046f788 in zend_deactivate () at /home/james/php-5.1.0b2/Zend/zend.c:823 #9 0x4043f848 in php_request_shutdown (dummy=0x0)
at /home/james/php-5.1.0b2/main/main.c:1237#10 0x404ff38b in apache_php_module_main (r=0x8158768, display_source_mode=0)
at /home/james/php-5.1.0b2/sapi/apache/sapi_apache.c:59#11 0x404ffd24 in send_php (r=0x8158768, display_source_mode=0, filename=0x0)
at /home/james/php-5.1.0b2/sapi/apache/mod_php5.c:639#12 0x404ffd72 in send_parsed_php (r=0x8158768)
at /home/james/php-5.1.0b2/sapi/apache/mod_php5.c:654#13 0x0805480d in ap_invoke_handler () #14 0x08067b0c in process_request_internal () #15 0x08067b83 in ap_process_request () #16 0x0805fc97 in child_main () #17 0x0805fe3a in make_child () #18 0x0805ff7d in startup_children () #19 0x080605d0 in standalone_main () #20 0x08060ed3 in main () #21 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6 Rob Richards wrote:
You should probably try a newer version of libxml2. I suspect you are hitting a refcount issue with dictionaries that was fixed in 2.6.8. And before you ask, the error would be more prominent using PHP 5.1 than 5.0. Rob James Crumpton wrote:So ... php-5.1.0b2 with --disable-zend-mm --enable-debug ... apache segfaults on startup. Without --disable-zend-nm, and run through valgrind, I don't actually experience the corruption, but boy is there a lot of output. Hope you like to read ;) I've included urls for the --disable-zend-mm segfaulting valgrind output (pid 30703), and the non --disable-zend-mm (pid 27107) below that. There is no interesting output from valgrind with php-5.0.4 and the same script. Without zend mm ---------------------------------------------------------- https://www.die.net/tmp/6f51b90defa5c822.txt/withoutmm.txt With zend mm ---------------------------------------------------------- https://www.die.net/tmp/00e9a7d1e7a5d0fc.txt/withmm.txt -james