<<< Date Index >>>     <<< Thread Index >>>

Re: [Mutt] #2935: Occasional segfault when IMAP inbox updates



#2935: Occasional segfault when IMAP inbox updates

Comment (by berni):

 okay, did some more research, I'm not a C coder by any chance but I found
 some weird things

 first of all, imap_read_headers is called

 {{{ imap_read_headers (idata=0x81a2580, msgbegin=306, msgend=307) at
 ../../imap/message.c:346 }}}

 for msg 306-307 (so two messages). However, in the end msgcount is 308 and
 mx_update_context is called for three new messages

 {{{ #0  mx_update_context (ctx=0x817fd28, new_messages=3) at ../mx.c:1664
 }}}

 the pointer to the headers for messages 306 and 307 are fine, but for 308
 the address is 0x0 and a segfault occurs when accessing h->security

 {{{
 (gdb) p ctx->hdrs[306]
 $7 = (HEADER *) 0x82ee590
 (gdb) p ctx->hdrs[307]
 $8 = (HEADER *) 0x8308d90
 (gdb) p ctx->hdrs[308]
 $9 = (HEADER *) 0x0
 }}}

 Could this be related to IMAP IDLE? I'm running dovecot on the server side
 (happens with both Dovecot 1.0 and 1.1), which is mentioned in the manpage
 for causing connection stalls.

 I'll try with imap_idle=no now, unfortunately this bug is not easy to
 reproduce.

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/2935#comment:3>