ID: 49098 Updated by: t...@php.net Reported By: bugs at timj dot co dot uk Status: Feedback Bug Type: Session related Operating System: Linux PHP Version: 5.2.10 New Comment:
With my original compile as per instructions above (the compiler got -O2 by default): #0 _zend_mm_alloc_int (heap=0x9e32b0, size=12) at /path/to/php5.2-200911070930/Zend/zend_alloc.c:1785 #1 0x000000000048227e in php_pcre_match_impl (pce=<value optimized out>, subject=<value optimized out>, subject_len=<value optimized out>, return_value=<value optimized out>, subpats=0x0, global=0, use_flags=0, flags=<value optimized out>, start_offset=0) at /path/to/php5.2-200911070930/ext/pcre/php_pcre.c:603 #2 0x0000000000482ccd in php_do_pcre_match (ht=2, return_value=0xd584a0, return_value_ptr=<value optimized out>, this_ptr=<value optimized out>, return_value_used=<value optimized out>, global=0) at /path/to/php5.2-200911070930/ext/pcre/php_pcre.c:513 #3 0x0000000000659303 in zend_do_fcall_common_helper_SPEC ( execute_data=0x7fffffffc420) at /path/to/php5.2-200911070930/Zend/zend_vm_execute.h:200 #4 0x000000000065522c in execute (op_array=0xd83190) at /path/to/php5.2-200911070930/Zend/zend_vm_execute.h:92 #5 0x0000000000658c76 in zend_do_fcall_common_helper_SPEC ( execute_data=0x7fffffffc740) at /path/to/php5.2-200911070930/Zend/zend_vm_execute.h:234 #6 0x000000000065522c in execute (op_array=0xd37808) at /path/to/php5.2-200911070930/Zend/zend_vm_execute.h:92 #7 0x0000000000658c76 in zend_do_fcall_common_helper_SPEC ( execute_data=0x7fffffffd660) Previous Comments: ------------------------------------------------------------------------ [2009-11-08 21:11:07] srina...@php.net thanks for taking time and trying to reproduce this issue. can u kindly provide / attach stack trace when this issue happens... this would help us identify us as to what is happening at ur end.. u can enable core dump by doing some thing like ulimit -c unlimited now, u can run your program to generate core dump and provide us the stack trace as mentioned in this below link.. http://bugs.php.net/bugs-generating-backtrace.php ------------------------------------------------------------------------ [2009-11-08 19:10:35] t...@php.net After spending an enormous amount of time testing endless combinations of compile and runtime options, I have hopefully found the key to solving this obscure bug. The segfault only happens specifically if the following is true: - the mbstring extension is enabled, *AND* - the mssql extension is enabled (particularly weird because the test script does not use mssql in any way) In the hope of making the reproduction scenario more robust, I have pared down the configure line to a minimum and here is the exact environment, from source tarball, which I can reproduce it in: OS: Fedora 11 x86_64 (fully updated as at 2009-11-08) Notable dependencies: mysql-devel-5.1.37-1.fc11.x86_64 freetds-devel-0.82-5.fc11.x86_64 gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC) Download snapshot 200911070930 from snaps.php.net tar -jxf php5.2-200911070930.tar.bz2 cd php5.2-200911070930 ./configure --includedir=/usr/include --libdir=/usr/lib64 --with-libdir=lib64 --without-pear --with-mysqli=shared,/usr/bin/mysql_config --enable-mbstring=shared --enable-mbregex --with-mssql=shared,/usr make -j3 make install # as root create /usr/local/etc/php.ini containing only the following: extension=mbstring.so extension=mssql.so extension=mysqli.so include_path=/path/to/pear/php $ /usr/local/bin/php -c /usr/local/etc/php.ini php-bug49098.php # script posted on 11 Aug Segmentation fault Commenting out EITHER "extension=mbstring.so" or "extension=mssql.so" in /usr/local/etc/php.ini stops the segfault. Can anyone else now reproduce this with the above environment? Is there any other information about the environment that I need to provide? ------------------------------------------------------------------------ [2009-09-26 10:54:13] t...@php.net 1. Still segfaults for me with the release version of 5.2.11, with MySQLi connection (mysql client libs and server 5.1.37). -> Sriram, I also tried with your test script (just to make sure there wasn't a subtle difference from mine) and it also segfaulted. -> Segfault is still in the same place as originally. 2. snap-200909261030 doesn't build atm (error in mysqli_api) What more info can I give to assist? ------------------------------------------------------------------------ [2009-09-24 19:32:19] srina...@php.net unable to reproduce with the earlier provided test case. so, need more information to reproduce / investigate this bug . also, would be useful to know if this still happens with either 5.2.11 (or latest svn snapshot) ------------------------------------------------------------------------ [2009-09-24 17:48:47] srina...@php.net i do have a wordpress running with php 5.2.11 for my site and i don't have any issues. if you do notice with the latest php build, if you can provide a test case to reproduce this bug that would be useful. as i noted earlier, i was not able to reproduce this bug with the provided test case here. ------------------------------------------------------------------------ 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/49098 -- Edit this bug report at http://bugs.php.net/?id=49098&edit=1