ID: 20254 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: IMAP related Operating System: Linux (2.4.18) PHP Version: 4.3.0-dev New Comment:
hello. similar problem, imap_header() crash, but with other condition - long To: header php 4.2.3 as CLI,libc-client: 4.7-c2 bug can be reproduced with message containing following header: To: Someone <[EMAIL PROTECTED]>, Someone2 <[EMAIL PROTECTED]>, ... Someone144 <email144@somehost> I didn't test actual threshold, it could be smaller then 144. test script: $imap=imap_open("{localhost:143}INBOX","user","pass"); if (!$imap) echo "connect failed\n"; $header=imap_header($imap,1); backtrace: Program received signal SIGSEGV, Segmentation fault. 0x3d0f86 in malloc () from /lib/libc.so.6 (gdb) bt #0 0x3d0f86 in malloc () from /lib/libc.so.6 #1 0x3d0ca4 in malloc () from /lib/libc.so.6 #2 0x80c723c in _emalloc (size=12) at zend_alloc.c:165 #3 0x53e39e in _php_imap_parse_address (addresslist=0x817bfe0, fulladdress=0xbd870ec8, paddress=0x818476c) at php_imap.c:3632 #4 0x53e62e in _php_make_header_object (myzvalue=0x8178c3c, en=0x817ce58) at php_imap.c:3666 #5 0x536dbd in zif_imap_headerinfo (ht=2, return_value=0x8178c3c, this_ptr=0x0, return_value_used=1) at php_imap.c:1631 #6 0x497d99 in zend_assign_to_variable_reference () from /usr/local/Zend/lib/ZendOptimizer.so #7 0x4a1144 in zend_oe () from /usr/local/Zend/lib/ZendOptimizer.so #8 0x80d3fb8 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:812 #9 0x805f81d in php_execute_script (primary_file=0xbd873388) at main.c:1383 #10 0x805d6e3 in main (argc=2, argv=0xbd873404) at cgi_main.c:778 #11 0x37c0bf in __libc_start_main () from /lib/libc.so.6 Previous Comments: ------------------------------------------------------------------------ [2002-11-14 22:39:24] [EMAIL PROTECTED] I'm in another situation. I configured php with uw-imap c-client, but courier-imap server is running. Stopping courier-imap server and, Test with uw-iamp server, there was no crash. Test with courier-imap server again, here backtrace report. (gdb) bt #0 0x403b480e in _zval_ptr_dtor (zval_ptr=0x0, __zend_filename=0x4046de00 "/usr/local/src/php4-200211030600/Zend/zend_variables.c", __zend_lineno=167) at /usr/local/src/php4-200211030600/Zend/zend_execute_API.c:291 #1 0x403be4d2 in _zval_ptr_dtor_wrapper (zval_ptr=0x0) at /usr/local/src/php4-200211030600/Zend/zend_variables.c:167 #2 0x403c5a01 in zend_hash_destroy (ht=0x812eacc) at /usr/local/src/php4-200211030600/Zend/zend_hash.c:543 #3 0x403be19a in _zval_dtor (zvalue=0x812ea8c, __zend_filename=0x4046d6a0 "/usr/local/src/php4-200211030600/Zend/zend_execute_API.c", __zend_lineno=293) at /usr/local/src/php4-200211030600/Zend/zend_variables.c:60 #4 0x403b4839 in _zval_ptr_dtor (zval_ptr=0x811c820, __zend_filename=0x4046de00 "/usr/local/src/php4-200211030600/Zend/zend_variables.c", __zend_lineno=167) at /usr/local/src/php4-200211030600/Zend/zend_execute_API.c:293 #5 0x403be4d2 in _zval_ptr_dtor_wrapper (zval_ptr=0x811c820) at /usr/local/src/php4-200211030600/Zend/zend_variables.c:167 #6 0x403c5a01 in zend_hash_destroy (ht=0x404da80c) at /usr/local/src/php4-200211030600/Zend/zend_hash.c:543 #7 0x403b433e in shutdown_executor () at /usr/local/src/php4-200211030600/Zend/zend_execute_API.c:186 #8 0x403bf70f in zend_deactivate () at /usr/local/src/php4-200211030600/Zend/zend.c:625 #9 0x40387bd3 in php_request_shutdown (dummy=0x0) at /usr/local/src/php4-200211030600/main/main.c:913 #10 0x403d6dfa in apache_php_module_main (r=0x8114ad4, display_source_mode=0) at /usr/local/src/php4-200211030600/sapi/apache/sapi_apache.c:61 #11 0x403d7c48 in send_php (r=0x8114ad4, display_source_mode=0, filename=0x8116614 "/home/www/test.php") at /usr/local/src/php4-200211030600/sapi/apache/mod_php4.c:556 #12 0x403d7cb5 in send_parsed_php (r=0x8114ad4) at /usr/local/src/php4-200211030600/sapi/apache/mod_php4.c:571 #13 0x08054823 in ap_invoke_handler () #14 0x08069ca7 in process_request_internal () #15 0x08069d08 in ap_process_request () #16 0x08060a79 in child_main () #17 0x08060c48 in make_child () #18 0x08060dbc in startup_children () #19 0x08061434 in standalone_main () #20 0x08061cb3 in main () #21 0x400ad1c4 in __libc_start_main () from /lib/libc.so.6 (gdb) ------------------------------------------------------------------------ [2002-11-13 12:41:38] [EMAIL PROTECTED] Can you provide a backtrace using the latest CVS snapshot and compiled with Apache 1.3 ? ------------------------------------------------------------------------ [2002-11-12 23:34:51] [EMAIL PROTECTED] apache2 crashes more frequently(?) than apach1. if i try 10-20 times, one time crashes with apache2. on apache1, try 20-30 times, one time crash. ------------------------------------------------------------------------ [2002-11-08 06:48:28] [EMAIL PROTECTED] So it works? Only crashes with Apache2 ? ------------------------------------------------------------------------ [2002-11-08 00:08:24] [EMAIL PROTECTED] CLI (command line) php test was all right. apache2 configured with --prefix=/usr/local/apache2 --enable-so ------------------------------------------------------------------------ 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/20254 -- Edit this bug report at http://bugs.php.net/?id=20254&edit=1