From 1ac84bce76401955873f9d451757d799e0f618ff Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 19 Jan 2014 20:09:21 +2000 Subject: [PATCH] Re: [PATCH 2/2] lib: fix error handling --- 6a/288b3de4b8b813dbf1cc2e1f82422adf5ccc62 | 67 +++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 6a/288b3de4b8b813dbf1cc2e1f82422adf5ccc62 diff --git a/6a/288b3de4b8b813dbf1cc2e1f82422adf5ccc62 b/6a/288b3de4b8b813dbf1cc2e1f82422adf5ccc62 new file mode 100644 index 000000000..5c7808d8a --- /dev/null +++ b/6a/288b3de4b8b813dbf1cc2e1f82422adf5ccc62 @@ -0,0 +1,67 @@ +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 3C950431FC0 + for ; Sat, 18 Jan 2014 16:09:28 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 kOnO6aC-iHqd for ; + Sat, 18 Jan 2014 16:09:26 -0800 (PST) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id BFCD4431FBC + for ; Sat, 18 Jan 2014 16:09:26 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1W4fx7-0003ls-2j; Sat, 18 Jan 2014 20:09:25 -0400 +Received: (nullmailer pid 32014 invoked by uid 1000); Sun, 19 Jan 2014 + 00:09:21 -0000 +From: David Bremner +To: Tomi Valkeinen , notmuch@notmuchmail.org +Subject: Re: [PATCH 2/2] lib: fix error handling +In-Reply-To: <1384837831-9206-2-git-send-email-tomi.valkeinen@iki.fi> +References: <1384837831-9206-1-git-send-email-tomi.valkeinen@iki.fi> + <1384837831-9206-2-git-send-email-tomi.valkeinen@iki.fi> +User-Agent: Notmuch/0.17+30~g50677dd (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sat, 18 Jan 2014 20:09:21 -0400 +Message-ID: <87vbxgg7da.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +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: Sun, 19 Jan 2014 00:09:28 -0000 + +Tomi Valkeinen writes: + +> Currently if a Xapian exception happens in notmuch_message_get_header, +> the exception is not caught leading to crash. In +> notmuch_message_get_date the exception is caught, but an internal error +> is raised, again leading to crash. +> +> This patch fixes the error handling by making both functions catch the +> Xapian exceptions, print an error and return NULL or 0. + +pushed, + +thanks + +d -- 2.26.2