Re: [notmuch] Segfault searching for tags
authorCarl Worth <cworth@cworth.org>
Sat, 21 Nov 2009 00:32:34 +0000 (01:32 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:37 +0000 (09:35 -0800)
f3/778c45757da4bd2d843cb088f52b48ff2a30fe [new file with mode: 0644]

diff --git a/f3/778c45757da4bd2d843cb088f52b48ff2a30fe b/f3/778c45757da4bd2d843cb088f52b48ff2a30fe
new file mode 100644 (file)
index 0000000..9d76feb
--- /dev/null
@@ -0,0 +1,69 @@
+Return-Path: <cworth@cworth.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id E57E8431FBF;\r
+       Fri, 20 Nov 2009 16:32:46 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id NvMDmGYCJmxD; Fri, 20 Nov 2009 16:32:46 -0800 (PST)\r
+Received: from cworth.org (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id EE09E431FAE;\r
+       Fri, 20 Nov 2009 16:32:45 -0800 (PST)\r
+From: Carl Worth <cworth@cworth.org>\r
+To: Adrian Perez de Castro <aperez@igalia.com>, notmuch@notmuchmail.org\r
+In-Reply-To: <20091120200300.55ba8736@hikari>\r
+References: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com>\r
+       <20091119164543.25e7afe5@hikari>\r
+       <935ead450911191823s776fda6eyb6f6949ac982bd03@mail.gmail.com>\r
+       <87lji11leu.fsf@yoom.home.cworth.org> <20091120200300.55ba8736@hikari>\r
+Date: Sat, 21 Nov 2009 01:32:34 +0100\r
+Message-ID: <87tywo3efx.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Subject: Re: [notmuch] Segfault searching for tags\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 21 Nov 2009 00:32:47 -0000\r
+\r
+On Fri, 20 Nov 2009 20:03:00 +0100, Adrian Perez de Castro <aperez@igalia.com> wrote:\r
+> Well, of course you are right, it is an overloaded operator, which\r
+> (unfortunately, IMHO) looks like a pointer dereference. That is exactly\r
+> one of the things that I find more confusing about C++: it has features\r
+> like operator overloading which look cool initially, but that in the end\r
+> imply more complexity than needed. I can understand why you decided to\r
+> wrap Xapian with a plain C API :)\r
+\r
+I'm glad you agree.\r
+\r
+Though I should mention that I earned my summer's salary during an\r
+internship once by solving a performance problem that had dodged the\r
+engineers on the project, (since they overlooked an overloaded array\r
+subscript operator on a std::string class as something that could be\r
+expensive---profiling made it obvious, and a temporary copy to a real\r
+array with a real subscript fixed the bug).\r
+\r
+So I can't say that operator overloading never helped me. But I know I\r
+left that internship determined not to use it myself.\r
+\r
+> I can confirm that this patch avoids the segfault in my case, too. Thanks\r
+> a lot for the quick fix.\r
+\r
+Excellent. I'm glad to hear it worked for you.\r
+\r
+I'm sorry that the bug was there, since this was a regression that's\r
+come back once or twice now. The project is overdue for a test suite\r
+already...\r
+\r
+-Carl\r