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 7C9614196F2 for ; Tue, 13 Apr 2010 08:55:02 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.89 X-Spam-Level: X-Spam-Status: No, score=-2.89 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, T_MIME_NO_TEXT=0.01] autolearn=ham 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 i70CcxPLyl0m; Tue, 13 Apr 2010 08:55:01 -0700 (PDT) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 7EF56431FC1; Tue, 13 Apr 2010 08:55:01 -0700 (PDT) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 3500A5883A6; Tue, 13 Apr 2010 08:55:01 -0700 (PDT) From: Carl Worth To: "martin f. krafft" , notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] Do not segfault on empty mime parts In-Reply-To: <1267543888-18134-1-git-send-email-madduck@madduck.net> References: <1267543888-18134-1-git-send-email-madduck@madduck.net> Date: Tue, 13 Apr 2010 08:55:01 -0700 Message-ID: <87ljcre4a2.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: "martin f. krafft" 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: Tue, 13 Apr 2010 15:55:02 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Tue, 2 Mar 2010 16:31:28 +0100, "martin f. krafft" wrote: > notmuch previously unconditionally checked mime parts for various > properties, but not for NULL, which is the case if libgmime encounters > an empty mime part. Thanks for the fix. > Upon encounter of an empty mime part, the following is printed to > stderr (the second line due to my patch): >=20 > (process:17197): gmime-CRITICAL **: g_mime_message_get_mime_part: asser= tion `GMIME_IS_MESSAGE (message)' failed > Warning: Not indexing empty mime part. That message is all quite ugly. I'm perpetually annoyed by libraries that claim to detect major problems, (even "CRITICAL" problems!), and just print messages and march along. Either there *is* a critical problem here, in which case the library should halt after printing the message, (see for example, what notmuch does with its INTERNAL_ERROR macro), or there's no problem at all and the code should operate correctly without these obnoxious messages. Anyway, I've put a note into TODO that we should do the following (in order): 1. Add a test case to trigger this message 2. File a bug against GMime to eliminate its portion of the message 3. Remove the notmuch portion of the message =2DCarl --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLxJPV6JDdNq8qSWgRApdxAJ9kLDhwuKnm6PUo4tYQbS20SUiwMQCdHSUA 8n/6OWa8t9JPf6mdmiF0fSs= =0ETF -----END PGP SIGNATURE----- --=-=-=--