From: Austin Clements Date: Thu, 1 Mar 2012 21:57:38 +0000 (+1900) Subject: Re: Internal error on line 296 of mime-node.c X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=e9d2d90f17fb89885a6c58d5d932e9d487544ae7;p=notmuch-archives.git Re: Internal error on line 296 of mime-node.c --- diff --git a/d6/e7749059a500b0b006b700e8299414e8303e92 b/d6/e7749059a500b0b006b700e8299414e8303e92 new file mode 100644 index 000000000..372b9d5f6 --- /dev/null +++ b/d6/e7749059a500b0b006b700e8299414e8303e92 @@ -0,0 +1,114 @@ +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 4CDD2431FAF + for ; Thu, 1 Mar 2012 13:57:42 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 92w4xzfU2ImJ for ; + Thu, 1 Mar 2012 13:57:41 -0800 (PST) +Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU + [18.7.68.35]) + by olra.theworths.org (Postfix) with ESMTP id BC00F431FAE + for ; Thu, 1 Mar 2012 13:57:41 -0800 (PST) +X-AuditID: 12074423-b7f9c6d0000008c3-51-4f4ff0d5e4d3 +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP + id C9.52.02243.5D0FF4F4; Thu, 1 Mar 2012 16:57:41 -0500 (EST) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q21LvecI001215; + Thu, 1 Mar 2012 16:57:40 -0500 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q21LvcRU012419 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Thu, 1 Mar 2012 16:57:39 -0500 (EST) +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1S3E0I-0003Lk-Mc; Thu, 01 Mar 2012 16:57:38 -0500 +Date: Thu, 1 Mar 2012 16:57:38 -0500 +From: Austin Clements +To: David Bremner +Subject: Re: Internal error on line 296 of mime-node.c +Message-ID: <20120301215738.GA7466@mit.edu> +References: <87d38w2e7h.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <87d38w2e7h.fsf@zancas.localnet> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IRYrdT1736wd/f4Hg7l8XzB1cZLa7fnMns + wOTxbNUtZo+jc/azBTBFcdmkpOZklqUW6dslcGXs+bKRtaBPoGLFhvoGxoW8XYwcHBICJhJ/ + +q26GDmBTDGJC/fWs3UxcnEICexjlDj96gQzhLOeUeLwususEM4JJonJCz8yQjhLGCU+bnrC + BNLPIqAicfhtGwuIzSagIbFt/3JGkBUiAkoSm99JgISZBVQlGtdeZAaxhQXMJPYfXQJm8wpo + S2z68RGsVUhAR6LzyytWiLigxMmZT1ggerUkbvx7yQQykllAWmL5Pw6QMKeArsTRyZPBxogC + XTDl5Da2CYxCs5B0z0LSPQuhewEj8ypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdM73czBK91JTS + TYzgkHZR3sH456DSIUYBDkYlHl6Pif7+QqyJZcWVuYcYJTmYlER5b7wFCvEl5adUZiQWZ8QX + leakFh9ilOBgVhLh5b4LlONNSaysSi3Kh0lJc7AoifNqaL3zExJITyxJzU5NLUgtgsnKcHAo + SfBaAWNXSLAoNT21Ii0zpwQhzcTBCTKcB2i4IUgNb3FBYm5xZjpE/hSjopQ4rwVIQgAkkVGa + B9cLSzmvGMWBXhHmNQGp4gGmK7juV0CDmYAGL77sBzK4JBEhJdXAuKI1b1bo+eTrpRrVVi1p + ZrbT/vPe15Q/XLDFztMgeNGf1byJzsz1FzS+ble1YTvq8Ltn9iaLkA0LNpzmvL3l6vurjzRY + 3wZ/UbjSblsWJOLElZT/8vp0Ycfl06Kn7l5wMXyV6vpvb/8F8Ux0O/1QUbxxxf1VH/Maap08 + zP5oLcn6N9HqgfhzWSWW4oxEQy3mouJEAD7Ij1AUAwAA +Cc: notmuch +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: Thu, 01 Mar 2012 21:57:42 -0000 + +Quoth David Bremner on Mar 01 at 5:39 pm: +> +> In the current master (4fa77d031) I get a sort-of double crash on the +> attached message. +> +> The internal error on line 296 is reached, indicating some kind of bug, +> but then the G_OBJECT_TYPE crashes becase parent->part is null. +> +> The message is probably crap, I created it from another "real" message +> from some business that causes the same problem. +> +> (gdb) bt +> #0 0x0000000000416850 in mime_node_child (parent=0x8425fa0, child=0) +> at mime-node.c:296 +> #1 0x00000000004137f1 in format_part_json (ctx=0x8425f10, node=0x8425fa0, +> first=1) at notmuch-show.c:669 +> #2 0x0000000000413e54 in format_part_json_entry (ctx=0x8425f10, +> node=0x8425fa0, indent=0, params=0x7ff000470) at notmuch-show.c:758 +> #3 0x0000000000413f0f in show_message (ctx=0x8367680, format=0x6327e0, message= +> 0x83e9830, indent=0, params=0x7ff000470) at notmuch-show.c:776 +> #4 0x0000000000414165 in show_messages (ctx=0x8367680, format=0x6327e0, +> messages=0x8425e70, indent=0, params=0x7ff000470) at notmuch-show.c:835 +> #5 0x00000000004145f5 in do_show (ctx=0x8367680, query=0x83b36b0, +> format=0x6327e0, params=0x7ff000470) at notmuch-show.c:956 +> #6 0x0000000000414ba7 in notmuch_show_command (ctx=0x8367680, argc=3, +> argv=0x7ff000660) at notmuch-show.c:1089 +> #7 0x000000000040a9fe in main (argc=4, argv=0x7ff000658) at notmuch.c:294 +> (gdb) print *parent +> $3 = {part = 0x0, envelope_file = 0x83e9830, envelope_part = 0x0, +> nchildren = 1, parent = 0x0, part_num = 0, decrypt_attempted = 0, +> decrypt_success = 0, verify_attempted = 0, sig_list = 0x0, ctx = 0x8426090, +> decrypted_child = 0x0, next_child = 0, next_part_num = 1} + +For the record, this is because g_mime_parser_construct_message in +mime_node_open is returning NULL. mime_node_open should be checking +for this as well as errors from the other GMime functions it calls. +(Unfortunately, there appears to be no way to ask GMime *what* went +wrong; it just returns NULL.)