From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73598 invoked by alias); 29 May 2019 15:55:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 73493 invoked by uid 89); 29 May 2019 15:55:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 May 2019 15:55:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 54ECB117EAE; Wed, 29 May 2019 11:55:42 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id sifYj7pSmtfe; Wed, 29 May 2019 11:55:42 -0400 (EDT) Received: from murgatroyd (174-29-48-168.hlrn.qwest.net [174.29.48.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 44FBE117EA4; Wed, 29 May 2019 11:55:40 -0400 (EDT) From: Tom Tromey To: Sergio Durigan Junior Cc: GDB Patches Subject: Re: [PATCH] Don't crash is dwarf_decode_macro_bytes's 'body' is NULL, even when '!is_define' References: <87tvdv3jjy.fsf@redhat.com> <20190529144343.20201-1-sergiodj@redhat.com> Date: Wed, 29 May 2019 15:55:00 -0000 In-Reply-To: <20190529144343.20201-1-sergiodj@redhat.com> (Sergio Durigan Junior's message of "Wed, 29 May 2019 10:43:43 -0400") Message-ID: <877ea9z24k.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-05/txt/msg00645.txt.bz2 >>>>> "Sergio" == Sergio Durigan Junior writes: Sergio> Ref.: https://bugzilla.redhat.com/show_bug.cgi?id=1715008 Sergio> On commit 7bede82892a06e6c26989803e70f53697392dcf9 ("Don't crash if Sergio> dwarf_decode_macro_bytes's 'body' is NULL"), I was too strict when Sergio> checking if 'body' is NULL: the check only comprised the case when Sergio> 'is_define' is true. However, the corruption of .debug_macro by Sergio> rpmbuild's "debugedit" also affects the case when 'is_define' is Sergio> false, i.e., when the macro is being undefined. Sergio> This commit improves the check and covers both cases now. This has Sergio> been tested on Fedora 30 with a problematic debuginfo, and I don't see Sergio> a segfault anymore. Sergio> OK to push? Thanks for doing this. This is ok. Tom