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

Re: crash in imap_expunge_mailbox (similar to #2175)



On Tuesday, 07 March 2006 at 16:20, Kyle Wheeler wrote:
> On Tuesday, March  7 at 11:07 AM, quoth Kyle Wheeler:
> >I found another crash, in mx_update_context, in mx.c (around line 
> >1577). The avoidance is simple:
> 
> And another one (hey, two in one day!), also in mx.c, 
> mx_update_tables() around line 1044. The avoidance is again simple:
> 
>  for (i = 0, j = 0; i < ctx->msgcount; i++)
>  {
> +   if (! ctx->hdrs[i]) continue;
>    if ((committing && (!ctx->hdrs[i]->deleted ||
>                        (ctx->magic == M_MAILDIR && option 
>                        (OPTMAILDIRTRASH)))) ||
>        (!committing && ctx->hdrs[i]->active))
>    {
> 
> I don’t know if these little one-liners are helping anybody… but hey, 
> a little assumption-verification never hurt anybody.

I don't think these are the way to go. If a header is missing, that's
a symptom of worse trouble. I think it's the flag handler getting
confused by flags for different messages in imap_open_mailbox. I'm
expecting that before these crashes somewhere in .muttdebug you're
seeing some kind of 'uid out of sync' message. Will try to take a look
later today - RL has been kind of crazy lately...