From: Olly Betts Date: Fri, 6 Sep 2013 21:29:54 +0000 (+0100) Subject: Re: segfault with xapian 1.3.1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ee752201c7a0e69cce106e783ce13310b86472a2;p=notmuch-archives.git Re: segfault with xapian 1.3.1 --- diff --git a/c1/0e9427167abc6481d22bad984118a03132ac9f b/c1/0e9427167abc6481d22bad984118a03132ac9f new file mode 100644 index 000000000..65e1c00f8 --- /dev/null +++ b/c1/0e9427167abc6481d22bad984118a03132ac9f @@ -0,0 +1,75 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 44E51431FB6 + for ; Fri, 6 Sep 2013 16:35:30 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id fypeHTEBJ8-i for ; + Fri, 6 Sep 2013 16:35:25 -0700 (PDT) +X-Greylist: delayed 7525 seconds by postgrey-1.32 at olra; + Fri, 06 Sep 2013 16:35:25 PDT +Received: from atreus.tartarus.org (atreus.tartarus.org [80.252.125.10]) + (using TLSv1 with cipher AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 617F4431FAF + for ; Fri, 6 Sep 2013 16:35:25 -0700 (PDT) +Received: from olly by atreus.tartarus.org with local (Exim 4.69) + (envelope-from ) + id 1VI3bG-0006LV-Sv; Fri, 06 Sep 2013 22:29:54 +0100 +Date: Fri, 6 Sep 2013 22:29:54 +0100 +From: Olly Betts +To: David Bremner +Subject: Re: segfault with xapian 1.3.1 +Message-ID: <20130906212954.GB31164@survex.com> +References: + + <87txhypzvz.fsf@zancas.localnet> <87r4d2pwv1.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <87r4d2pwv1.fsf@zancas.localnet> +User-Agent: Mutt/1.5.21 (2010-09-15) +Cc: notmuch ML +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 06 Sep 2013 23:35:30 -0000 + +Olly wrote on IRC: +> bremner: ok, 1.2 explicitly no-oped skip_to() on an iterator at_end on +> trunk that code has been rewritten without that explicit check, and +> the iterator internals are NULL then i think restoring the check is +> reasonable, though I'm not sure if we actually promise that's defined +> behaviour if you want to work with 1.3.1, then checking against the +> end iterator before calling skip_to() will work for any version + +I've put a NULL check in there, and also for the other iterator classes +which use NULL internals to signify being at the end - this only worked +for TermIterator in 1.2.x, but it seems reasonable to make it work in +general and a NULL pointer check isn't a big overhead. + +On Thu, Sep 05, 2013 at 10:22:42PM -0300, David Bremner wrote: +> So, now we know what to fix. + +This should work again in 1.3.2 (once it is out), but if you want to +support 1.3.1 then you need the check. + +Cheers, + Olly