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

Hans Morten Kind Kind at it.uib.no
Fri Oct 27 20:13:28 UTC 2006


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);




More information about the dovecot mailing list