ID: 24526
Updated by: [EMAIL PROTECTED]
Reported By: kaMe at barcolabeach dot org
-Status: Open
+Status: Feedback
Bug Type: IMAP related
Operating System: Linux 2.4
-PHP Version: 4.3.2
+PHP Version: 4.3.3RC2-dev
New Comment:
Add some debugging echo's or something there to see what that
$this->agent contains when it segfaults.
Previous Comments:
------------------------------------------------------------------------
[2003-07-08 11:07:11] kaMe at barcolabeach dot org
I tryed stracing a httpd -X process, the last few lines was:
open("/usr/local/apache2/htdocs/horde/lib/Browser.php",
[.. cut]
read(10, "<?php\n/**\n * The Browser:: class"..., 8192) = 8192
brk(0x827e000) = 0x827e000
brk(0x827f000) = 0x827f000
brk(0x8283000) = 0x8283000
brk(0x8293000) = 0x8293000
read(10, "(\'|HotJava/([0-9]+)|\', $this->ag"..., 8192) = 7787
read(10, "", 8192) = 0
close(10) = 0
--- SIGSEGV (Segmentation fault) ---
In the /horde/lib/Browser.php, the line with that HotJava regexp is the
number 240:
} elseif (preg_match('|HotJava/([0-9]+)|', $this->agent, $version)) {
Hope this helps..
Tell me if I can help more..
------------------------------------------------------------------------
[2003-07-08 10:10:59] kaMe at barcolabeach dot org
Which is the easier way to do it?
------------------------------------------------------------------------
[2003-07-08 09:24:31] [EMAIL PROTECTED]
The original bug might have already been fixed. :)
Could you try and find in the horde sources which line is causing this
preg_match() crash..?
------------------------------------------------------------------------
[2003-07-08 04:15:50] kaMe at barcolabeach dot org
With the latest cvs snap (PHP/4.3.3RC2-dev) with debug mode activated,
i get this segfault accessing /horde/, I think it's something else of
my original problem.
#0 0x4031f3e3 in php_pcre_match (ht=3, return_value=0x8291e4c,
this_ptr=0x0, return_value_used=1, global=0)
at
/root/temp-apache/php4-STABLE-200307080530/ext/pcre/php_pcre.c:442
#1 0x4031fd09 in zif_preg_match (ht=3, return_value=0x8291e4c,
this_ptr=0x0, return_value_used=1)
at
/root/temp-apache/php4-STABLE-200307080530/ext/pcre/php_pcre.c:600
#2 0x404154c2 in execute (op_array=0x8281a1c) at
/root/temp-apache/php4-STABLE-200307080530/Zend/zend_execute.c:1616
#3 0x4041570c in execute (op_array=0x828273c) at
/root/temp-apache/php4-STABLE-200307080530/Zend/zend_execute.c:1660
#4 0x4041570c in execute (op_array=0x8189cfc) at
/root/temp-apache/php4-STABLE-200307080530/Zend/zend_execute.c:1660
#5 0x4041785d in execute (op_array=0x81898fc) at
/root/temp-apache/php4-STABLE-200307080530/Zend/zend_execute.c:2177
#6 0x40402334 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at
/root/temp-apache/php4-STABLE-200307080530/Zend/zend.c:886
#7 0x403c6e8c in php_execute_script (primary_file=0xbffff4bc) at
/root/temp-apache/php4-STABLE-200307080530/main/main.c:1685
#8 0x4041baea in php_handler (r=0x817a6c8) at
/root/temp-apache/php4-STABLE-200307080530/sapi/apache2handler/sapi_apache2.c:525
#9 0x8080779 in ap_run_handler (r=0x817a6c8) at config.c:194
#10 0x8080cc3 in ap_invoke_handler (r=0x817a6c8) at config.c:401
#11 0x80704e6 in ap_process_request (r=0x817a6c8) at
http_request.c:288
#12 0x806c5ba in ap_process_http_connection (c=0x8176698) at
http_core.c:293
#13 0x80896e8 in ap_run_process_connection (c=0x8176698) at
connection.c:85
#14 0x808998c in ap_process_connection (c=0x8176698, csd=0x81765c0) at
connection.c:211
#15 0x807f46d in child_main (child_num_arg=0) at prefork.c:696
#16 0x807f528 in make_child (s=0x80bbf58, slot=0) at prefork.c:736
#17 0x807f615 in startup_children (number_to_start=5) at prefork.c:808
#18 0x807f90c in ap_mpm_run (_pconf=0x80b9850, plog=0x80f1930,
s=0x80bbf58) at prefork.c:1024
#19 0x8084e4e in main (argc=2, argv=0xbffff804) at main.c:660
#20 0x401952eb in __libc_start_main (main=0x80846d0 <main>, argc=2,
ubp_av=0xbffff804, init=0x806241c <_init>, fini=0x809b24c <_fini>,
rtld_fini=0x4000c130 <_dl_fini>, stack_end=0xbffff7fc) at
../sysdeps/generic/libc-start.c:129
By the way, here is your full gdb output, with php4.3.2 without debug
(the original one):
#0 0x402dd992 in zif_imap_rfc822_parse_adrlist (ht=2,
return_value=0x8239a0c, this_ptr=0x0, return_value_used=1)
at /root/temp-apache/php-4.3.2/ext/imap/php_imap.c:1979
#1 0x403bac83 in execute (op_array=0x821dc8c) at
/root/temp-apache/php-4.3.2/Zend/zend_execute.c:1608
#2 0x403a92b2 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/temp-apache/php-4.3.2/Zend/zend.c:869
#3 0x403817c5 in php_execute_script (primary_file=0xbffff4d4) at
/root/temp-apache/php-4.3.2/main/main.c:1671
#4 0x403c225d in php_handler (r=0x8180688) at
/root/temp-apache/php-4.3.2/sapi/apache2handler/sapi_apache2.c:525
#5 0x8080779 in ap_run_handler (r=0x8180688) at config.c:194
#6 0x8080cc3 in ap_invoke_handler (r=0x8180688) at config.c:401
#7 0x80704e6 in ap_process_request (r=0x8180688) at
http_request.c:288
#8 0x806c5ba in ap_process_http_connection (c=0x8176718) at
http_core.c:293
#9 0x80896e8 in ap_run_process_connection (c=0x8176718) at
connection.c:85
#10 0x808998c in ap_process_connection (c=0x8176718, csd=0x8176640) at
connection.c:211
#11 0x807f46d in child_main (child_num_arg=0) at prefork.c:696
#12 0x807f528 in make_child (s=0x80bbf58, slot=0) at prefork.c:736
#13 0x807f615 in startup_children (number_to_start=5) at prefork.c:808
#14 0x807f90c in ap_mpm_run (_pconf=0x80b9850, plog=0x80f1930,
s=0x80bbf58) at prefork.c:1024
#15 0x8084e4e in main (argc=2, argv=0xbffff804) at main.c:660
#16 0x401952eb in __libc_start_main (main=0x80846d0 <main>, argc=2,
ubp_av=0xbffff804, init=0x806241c <_init>, fini=0x809b24c <_fini>,
rtld_fini=0x4000c130 <_dl_fini>, stack_end=0xbffff7fc) at
../sysdeps/generic/libc-start.c:129
------------------------------------------------------------------------
[2003-07-07 19:07:24] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
1. Add --enable-debug to your configure line first)
2. Provide a FULL GDB backtrace, not just the first lines.
3. Try the same with Apache 1.3.27
------------------------------------------------------------------------
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/24526
--
Edit this bug report at http://bugs.php.net/?id=24526&edit=1