[notmuch] Segfault searching for tags

Jeffrey Ollie jeff at ocjtech.us
Fri Nov 20 05:10:38 PST 2009


On Fri, Nov 20, 2009 at 5:32 AM, Carl Worth <cworth at cworth.org> wrote:
> On Thu, 19 Nov 2009 16:45:43 +0100, Adrian Perez de Castro <aperez at igalia.com> wrote:
>> The thing is that in notmuch_message_get_in_reply_to(), line 288, a NULL
>> instance of Xapian::TermIterator is dereferenced. In my particular case,
>> the culpript is a cache file of Claws-Mail, as seen in the following GDB
>> session:
>
> Not quite NULL, (nor is it quite dereferencing---this is nasty C++
> overloading), but yeah, the idea is the same. We need to protect all of
> our "calls" to this overloaded operator to not call it when the iterator
> is equal to the value returned by termlist_end ().
>
> On Thu, 19 Nov 2009 20:23:15 -0600, Jeffrey Ollie <jeff at ocjtech.us> wrote:
>> I straced some of the crashes, and the last file that was read before
>> the crash was a malformed message.  I've attached one of the messages.
>
> Thanks for the file. I never like to push code that I haven't tested, so
> this was very helpful.
>
> Below is the patch that I just pushed which seems to do the trick.

Ah, excellent!  This does indeed seem to prevent the crash.  Now I
just need to figure out how to get all my mail out of GMail.

-- 
Jeff Ollie


More information about the notmuch mailing list