ID:               19482
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Feedback
+Status:           Open
 Bug Type:         PCRE related
 Operating System: Redhat 7.3
 PHP Version:      4.2.3,4.3.0-dev
 New Comment:

I tried with the newest snapshot but I get the following backtrace

(gdb) run -X -DSSL -f /usr/local/apache/conf/httpd.conf
Starting program: /usr/local/apache/bin/httpd -X -DSSL -f
/usr/local/apache/conf/httpd.conf

Program received signal SIGSEGV, Segmentation fault.
0x403d2e94 in _efree (ptr=0x0)
    at /usr/local/software/php4-200210061800/Zend/zend_alloc.c:211
211             CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
(gdb) bt
#0  0x403d2e94 in _efree (ptr=0x0)
    at /usr/local/software/php4-200210061800/Zend/zend_alloc.c:211
#1  0x403e5b8e in zend_hash_destroy (ht=0x82ea824)
    at /usr/local/software/php4-200210061800/Zend/zend_hash.c:550
#2  0x403e063a in _zval_dtor (zvalue=0x81802ec)
    at /usr/local/software/php4-200210061800/Zend/zend_variables.c:51
#3  0x403f1206 in execute (op_array=0x82d130c)
    at /usr/local/software/php4-200210061800/Zend/zend_execute.c:449
#4  0x403f411a in execute (op_array=0x82182e4)
    at /usr/local/software/php4-200210061800/Zend/zend_execute.c:1641
#5  0x403e1adc in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
    at /usr/local/software/php4-200210061800/Zend/zend.c:834
#6  0x403bbfed in php_execute_script (primary_file=0xbffff6d0)
    at /usr/local/software/php4-200210061800/main/main.c:1542
#7  0x403fb4b6 in apache_php_module_main (r=0x816c9e0,
display_source_mode=0)
    at
/usr/local/software/php4-200210061800/sapi/apache/sapi_apache.c:55
#8  0x403fbfd6 in send_php (r=0x816c9e0, display_source_mode=0,
filename=0x0)
    at
/usr/local/software/php4-200210061800/sapi/apache/mod_php4.c:564
#9  0x403fc02a in send_parsed_php (r=0x816c9e0)
    at
/usr/local/software/php4-200210061800/sapi/apache/mod_php4.c:579
#10 0x0806bdcf in ap_invoke_handler ()
#11 0x08080e53 in process_request_internal ()
#12 0x08080eb4 in ap_process_request ()
---Type <return> to continue, or q <return> to quit---
#13 0x08077df1 in child_main ()
#14 0x08077fc0 in make_child ()
#15 0x08078134 in startup_children ()
#16 0x080787ac in standalone_main ()
#17 0x0807902b in main ()
#18 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6


Previous Comments:
------------------------------------------------------------------------

[2002-10-06 19:08:49] [EMAIL PROTECTED]

Note sure if this will be useful, but if i edit main/php_config.h
(after running ./configure) and remove all LOCALE defines, here's a
backtrace of the segfault:

------------------

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 6702)]
0x403d6c67 in _zval_dtor (zvalue=0x82ad344,
    __zend_filename=0x40432520
"/tmp/php-debug/Zend/zend_execute_API.c",
    __zend_lineno=291) at /tmp/php-debug/Zend/zend_variables.c:43
43                              CHECK_ZVAL_STRING_REL(zvalue);
(gdb) bt
#0  0x403d6c67 in _zval_dtor (zvalue=0x82ad344,
    __zend_filename=0x40432520
"/tmp/php-debug/Zend/zend_execute_API.c",
    __zend_lineno=291) at /tmp/php-debug/Zend/zend_variables.c:43
#1  0x403cd471 in _zval_ptr_dtor (zval_ptr=0x40463b80,
    __zend_filename=0x40434300
"/tmp/php-debug/Zend/zend_execute_locks.h",
    __zend_lineno=26) at /tmp/php-debug/Zend/zend_execute_API.c:291
#2  0x403ee0b4 in zend_clean_garbage () at
/tmp/php-debug/Zend/zend_execute_locks.h:26
#3  0x403e7bd5 in execute (op_array=0x82ae564) at
/tmp/php-debug/Zend/zend_execute.c:1050
#4  0x403eab86 in execute (op_array=0x81e95c4) at
/tmp/php-debug/Zend/zend_execute.c:1641
#5  0x403eab86 in execute (op_array=0x8241b2c) at
/tmp/php-debug/Zend/zend_execute.c:1641
#6  0x403d8ad8 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
    at /tmp/php-debug/Zend/zend.c:834
#7  0x403a2542 in php_execute_script (primary_file=0xbffff700)
    at /tmp/php-debug/main/main.c:1542
#8  0x403ef8c2 in apache_php_module_main (r=0x808cf18,
display_source_mode=0)
    at /tmp/php-debug/sapi/apache/sapi_apache.c:55
#9  0x403f07bc in send_php (r=0x808cf18, display_source_mode=0,
    filename=0x808ebe0 "/var/www/modesmail/horde/imp/redirect.php")
    at /tmp/php-debug/sapi/apache/mod_php4.c:564
#10 0x403f0829 in send_parsed_php (r=0x808cf18)
    at /tmp/php-debug/sapi/apache/mod_php4.c:579
#11 0x0805475d in ap_invoke_handler ()
#12 0x080672dc in process_request_internal ()
#13 0x08067353 in ap_process_request ()
#14 0x0805f587 in child_main ()
#15 0x0805f72a in make_child ()
---Type <return> to continue, or q <return> to quit---
#16 0x0805f86d in startup_children ()
#17 0x0805fec0 in standalone_main ()
#18 0x080607c3 in main ()
#19 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6

------------------------------------------------------------------------

[2002-10-06 14:47:25] [EMAIL PROTECTED]

(gdb) up
#1  0x40304db2 in pcre_get_compiled_regex (regex=0x8201704 "|MSIE
([0-9.]+)|",
    extra=0xbfff7cac, preg_options=0xbfff7ca4)
    at /tmp/php4-200210060000/ext/pcre/php_pcre.c:158
158                     if (!strcmp(pce->locale, locale)) {
(gdb) print locale
$1 = 0x8156760 "en_US.iso885915"
(gdb) print pce
$2 = (pcre_cache_entry *) 0x8133668
(gdb) print pce->locale
$3 = 0x826bde8 <Address 0x826bde8 out of bounds>

------------------------------------------------------------------------

[2002-10-06 07:44:55] [EMAIL PROTECTED]

[EMAIL PROTECTED] :
Can you try that again, but when you hit the segfault,
type the following commands into gdb:

up
print locale
print pce
print pce->locale


------------------------------------------------------------------------

[2002-10-06 04:46:27] [EMAIL PROTECTED]

Still getting the segfault at almost the same place.  Seems a lot
easier to reproduce now.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 8821)]
0x4207fb88 in strcmp () from /lib/i686/libc.so.6
(gdb) bt
#0  0x4207fb88 in strcmp () from /lib/i686/libc.so.6
#1  0x40304db2 in pcre_get_compiled_regex (
    regex=0x819925c "|Internet Explorer/([0-9.]+)|", extra=0xbfff8ebc,
    preg_options=0xbfff8eb4) at
/tmp/php4-200210060000/ext/pcre/php_pcre.c:158
#2  0x40305827 in php_pcre_match (ht=3, return_value=0x81353cc,
this_ptr=0x0,
    return_value_used=1, global=0) at
/tmp/php4-200210060000/ext/pcre/php_pcre.c:408
#3  0x40305e74 in zif_preg_match (ht=3, return_value=0x81353cc,
this_ptr=0x0,
    return_value_used=1) at
/tmp/php4-200210060000/ext/pcre/php_pcre.c:559
#4  0x403eafa3 in execute (op_array=0x81e5dfc)
    at /tmp/php4-200210060000/Zend/zend_execute.c:1597
#5  0x403eb1d6 in execute (op_array=0x8198e24)
    at /tmp/php4-200210060000/Zend/zend_execute.c:1641
#6  0x403eb1d6 in execute (op_array=0x8223314)
    at /tmp/php4-200210060000/Zend/zend_execute.c:1641
#7  0x403ed202 in execute (op_array=0x817d5e4)
    at /tmp/php4-200210060000/Zend/zend_execute.c:2163
#8  0x403d9128 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
    at /tmp/php4-200210060000/Zend/zend.c:834
#9  0x403a2b92 in php_execute_script (primary_file=0xbffff6f0)
    at /tmp/php4-200210060000/main/main.c:1542
#10 0x403eff12 in apache_php_module_main (r=0x808cf18,
display_source_mode=0)
    at /tmp/php4-200210060000/sapi/apache/sapi_apache.c:55
#11 0x403f0e0c in send_php (r=0x808cf18, display_source_mode=0,
    filename=0x808ec10 "/var/www/modesmail/horde/imp/redirect.php")
    at /tmp/php4-200210060000/sapi/apache/mod_php4.c:564
#12 0x403f0e79 in send_parsed_php (r=0x808cf18)
---Type <return> to continue, or q <return> to quit---
    at /tmp/php4-200210060000/sapi/apache/mod_php4.c:579
#13 0x0805475d in ap_invoke_handler ()
#14 0x080672dc in process_request_internal ()
#15 0x08067353 in ap_process_request ()
#16 0x0805f587 in child_main ()
#17 0x0805f72a in make_child ()
#18 0x0805f86d in startup_children ()
#19 0x0805fec0 in standalone_main ()
#20 0x080607c3 in main ()
#21 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6

------------------------------------------------------------------------

[2002-10-05 09:43:33] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip



------------------------------------------------------------------------

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/19482

-- 
Edit this bug report at http://bugs.php.net/?id=19482&edit=1

Reply via email to