Bug #17692 Updated: imap_status caught Segmentation fault
| From: | sniper@php.net | Date: | Tue, 11 Jun 2002 10:58:27 +0000 |
| Subject: | Bug #17692 Updated: imap_status caught Segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10095@lists.php.net to get a copy of this message | ||
ID: 17692
Updated by: sniper@php.net
Reported By: dynein@fasterweb.net
-Status: Open
+Status: Bogus
Bug Type: IMAP related
Operating System: linux
PHP Version: 4.2.1
New Comment:
It's not a PHP bug. Report this to the c-client author.
Previous Comments:
------------------------------------------------------------------------
[2002-06-11 05:37:20] dynein@fasterweb.net
My imap server is courier-imap1.4.6,the c-client library is
imap-devel-2001a-1.71.0.
------------------------------------------------------------------------
[2002-06-11 05:11:57] mfischer@php.net
Are you using the latest version if imap ? It seems like a bug there.
------------------------------------------------------------------------
[2002-06-11 05:02:51] dynein@fasterweb.net
the test script:
<?php
$mbox=imap_open("{127.0.0.1:143}INBOX", $username, $password) or
die("Can't connect");
$mbox_status = imap_status($mbox,"INBOX",SA_ALL);
print $mbox_status->messages;
?>
the backtrace:
#0 imap_status (stream=0x0, mbx=0x82709b4 "INBOX", flags=31) at
imap4r1.c:496
496 if (LEVELSTATUS (stream)) { /* have STATUS command? */
(gdb) bt
#0 imap_status (stream=0x0, mbx=0x82709b4 "INBOX", flags=31) at
imap4r1.c:496
#1 0x0817ace3 in imap_status (stream=0x826ff30, mbx=0x82709b4 "INBOX",
flags=31)
at imap4r1.c:490
#2 0x08156102 in mail_status (stream=0x826ff30, mbx=0x82709b4 "INBOX",
flags=31) at mail.c:936
#3 0x080f35ab in zif_imap_status (ht=3, return_value=0x826b61c,
this_ptr=0x0,
return_value_used=1) at php_imap.c:2654
#4 0x0814438b in execute (op_array=0x826b75c) at
./zend_execute.c:1598
#5 0x080d01e2 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at zend.c:810
#6 0x0806da9a in php_execute_script (primary_file=0xbffff9d0) at
main.c:1381
#7 0x08067f58 in main (argc=2, argv=0xbffffa84) at cgi_main.c:778
#8 0x40158647 in __libc_start_main (main=0x80674b0 <main>, argc=2,
ubp_av=0xbffffa84,
init=0x8065e10 <_init>, fini=0x81a4f50 <_fini>,
rtld_fini=0x4000dcd4 <_dl_fini>,
stack_end=0xbffffa7c) at ../sysdeps/generic/libc-start.c:129
(gdb) frame 0
#0 imap_status (stream=0x0, mbx=0x82709b4 "INBOX", flags=31) at
imap4r1.c:496
496 if (LEVELSTATUS (stream)) { /* have STATUS command? */
(gdb) frame 1
#1 0x0817ace3 in imap_status (stream=0x826ff30, mbx=0x82709b4 "INBOX",
flags=31)
at imap4r1.c:490
490 return imap_status (NIL,mbx,flags);
(gdb) frame 2
#2 0x08156102 in mail_status (stream=0x826ff30, mbx=0x82709b4 "INBOX",
flags=31) at mail.c:936
936 return SAFE_STATUS (dtb,stream,mbx,flags);
(gdb) frame 3
#3 0x080f35ab in zif_imap_status (ht=3, return_value=0x826b61c,
this_ptr=0x0,
return_value_used=1) at php_imap.c:2654
2654 if (mail_status(imap_le_struct->imap_stream,
Z_STRVAL_PP(mbx), Z_LVAL_PP(flags))) {
(gdb) frame 4
#4 0x0814438b in execute (op_array=0x826b75c) at
./zend_execute.c:1598
1598
((zend_internal_function *)
EX(function_state).function)->handler(EX(opline)->extended_value,
EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object).ptr,
return_value_used TSRMLS_CC);
(gdb) frame 5
#5 0x080d01e2 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at zend.c:810
810 zend_execute(EG(active_op_array)
TSRMLS_CC);
(gdb) frame 6
#6 0x0806da9a in php_execute_script (primary_file=0xbffff9d0) at
main.c:1381
1381 retval = (zend_execute_scripts(ZEND_REQUIRE
TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p) ==
SUCCESS);
the confingure line:
./configure --enable-force-cgi-redirect --enable-sigchild --with-imap
--enable-debug
------------------------------------------------------------------------
[2002-06-11 03:53:34] mfischer@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
------------------------------------------------------------------------
[2002-06-11 03:44:53] dynein@fasterweb.net
$mbox = imap_open("{my.imap.host:imap_port}","username","password")
or die("can't connect: ".imap_last_error());
$status = imap_status($mbox,"INBOX",SA_ALL);
This operation has made apache Segmentation fault.
"child pid xxxx exit signal Segmentation fault (11)" will appear in the
apache log file.
but below works well:
$status = imap_status($mbox,"{my.imap.host:imap.port}INBOX",SA_ALL);
related software:imap-devel-2001a,php4.1.2,php4.2.1,apache
1.3.23,redhat 7.1
my configure line:
./configure --with-apxs=/usr/local/apache/bin/apxs --enable-sigchild
--with-imap --with-gettext --with-mysql=/usr --with-mm=/usr
--enable-trans-sid --enable-inline-optimization --enable-versioning
--with-zlib --with-mhash=/usr --with-mcrypt --with-iconv
--enable-shmop
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17692&edit=1