From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3920 invoked by alias); 29 May 2019 20:16:00 -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 3737 invoked by uid 89); 29 May 2019 20:16:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 May 2019 20:15:58 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF65034AF; Wed, 29 May 2019 20:15:52 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93BFA1001DD8; Wed, 29 May 2019 20:15:51 +0000 (UTC) From: Sergio Durigan Junior To: Tom Tromey 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> <877ea9z24k.fsf@tromey.com> Date: Wed, 29 May 2019 20:16:00 -0000 In-Reply-To: <877ea9z24k.fsf@tromey.com> (Tom Tromey's message of "Wed, 29 May 2019 09:55:39 -0600") Message-ID: <87tvdddnk8.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00660.txt.bz2 On Wednesday, May 29 2019, Tom Tromey wrote: >>>>>> "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. Thanks for the review, Tom. Pushed: 955b06fa576df1a6954263043ea3f3a5b9ad5940 -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/