ID: 31373 Comment by: Craig_Harris at HargreavesLansdown dot co dot uk Reported By: drews at dynamicwebpages dot de Status: No Feedback Bug Type: SimpleXML related Operating System: Linux PHP Version: 5.0.3 New Comment:
I'm getting this problem with PHP 5.1.6 on Apache 2.2.3 on Solaris Previous Comments: ------------------------------------------------------------------------ [2005-11-18 14:16:04] christian dot lefebvre at atosorigin dot com i have a short example code which segfaults too : <?php $data = simplexml_load_file('toto.xml'); $xml= $data->standings; $live= ($xml['live']==1); ?> toto.xml contains this : <data> <standings live="1"/> </data> I've 3 differents php 5.0.3 binaries, one segfaults, the other ones don't. The only differences are modules like ssl support. It works if i change the last line like this : live= ((string)$xml['live']==1); Seams to be a schroedingbug since a print just before corrects the problem too ! ------------------------------------------------------------------------ [2005-01-11 01:00:04] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2005-01-03 23:05:24] [EMAIL PROTECTED] Please provide the XML file. ------------------------------------------------------------------------ [2005-01-01 17:52:56] drews at dynamicwebpages dot de this might help further: compiled without "--enable-debug" it throws the segfault(11) and i have a gdb-bt for it: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 30198)] 0x40117211 in free () from /lib/i686/libc.so.6 (gdb) bt #0 0x40117211 in free () from /lib/i686/libc.so.6 #1 0x4068e3ba in _efree (ptr=0xbffefd20) at /usr/local/src/lamp/php-5.0.3/Zend/zend_alloc.c:287 #2 0x4069fc1e in compare_function (result=0xbfffabf0, op1=0xbffefd20, op2=0x8289964) at /usr/local/src/lamp/php-5.0.3/Zend/zend_operators.c:1279 #3 0x406a0483 in is_equal_function (result=0xbfffabf0, op1=0x837582c, op2=0x8289964) at /usr/local/src/lamp/php-5.0.3/Zend/zend_operators.c:1476 #4 0x406c77ec in zend_is_equal_handler (execute_data=0xbfffaf90, opline=0x8289934, op_array=0x821ec9c) at /usr/local/src/lamp/php-5.0.3/Zend/zend_execute.c:90 #5 0x406c4cec in execute (op_array=0x821ec9c) at /usr/local/src/lamp/php-5.0.3/Zend/zend_execute.c:1400 #6 0x406a3479 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/lamp/php-5.0.3/Zend/zend.c:1069 #7 0x4066b33f in php_execute_script (primary_file=0xbfffd2e0) at /usr/local/src/lamp/php-5.0.3/main/main.c:1628 #8 0x406d85a4 in apache_php_module_main (r=0x81d81cc, display_source_mode=0) at /usr/local/src/lamp/php-5.0.3/sapi/apache/sapi_apache.c:54 #9 0x406d907c in send_php (r=0x81d81cc, display_source_mode=0, filename=0x0) at /usr/local/src/lamp/php-5.0.3/sapi/apache/mod_php5.c:622 #10 0x406d9243 in send_parsed_php (r=0x81d81cc) at /usr/local/src/lamp/php-5.0.3/sapi/apache/mod_php5.c:637 #11 0x080549ff in ap_invoke_handler () #12 0x08069f5d in process_request_internal () #13 0x08069fbc in ap_process_request () #14 0x08060f1a in child_main () #15 0x080610e8 in make_child () #16 0x0806124e in startup_children () #17 0x0806190e in standalone_main () #18 0x08062146 in main () ------------------------------------------------------------------------ [2005-01-01 17:19:35] drews at dynamicwebpages dot de Hi Derick, the xml is valid and has about 360 lines of config.data, which i first had to clean up before posting. the max depth is four and i would really appreciate not to post it here. In case you really need it, i will clean everything and paste it, but i doubt if it will still help you if it is cleaned ... ? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31373 -- Edit this bug report at http://bugs.php.net/?id=31373&edit=1