[Dovecot] Unsolved : mbox-sync-rewrite.c : assertion failed

Timo Sirainen tss at iki.fi
Thu Nov 2 17:25:43 UTC 2006


On Fri, 2006-10-27 at 21:13 +0200, Hans Morten Kind wrote:
> On Thu, Oct 26, 2006 at 01:31:04PM -0700, Dalvenjah FoxFire wrote:
> > It got a bit weirder with this patch. It no longer crashed, but I got  
> > a different assert error, and a slight (fixable) corruption bug:
> 
> The patch seems to work here when 
>   array_append(&sync_ctx->mails, &mail_ctx->mail, 1);
> is always called after the new test
>   if (array_is_created(&mail_ctx->mail.keywords)) {
>   }
> instead of calling array_append() within the new if
> 
> hmk
> 
>      if (array_is_created(&mail_ctx->mail.keywords)) {
>         /* mail's keywords are allocated from a pool that's cleared
>                    for each mail. we'll need to copy it to something more
>                    permanent. */
>         ARRAY_CREATE(&keywords_copy, sync_ctx->saved_keywords_pool,
>                              unsigned int,
>                              array_count(&mail_ctx->mail.keywords));
>         array_append_array(&keywords_copy, &mail_ctx->mail.keywords);
>         mail_ctx->mail.keywords = keywords_copy;
> -       array_append(&sync_ctx->mails, &mail_ctx->mail, 1);
>      }
> +    array_append(&sync_ctx->mails, &mail_ctx->mail, 1);

Thanks, I probably would have wasted a long time trying to figure out
what the problem was :) Committed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20061102/4d5b4404/attachment.pgp 


More information about the dovecot mailing list