From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id F21D63840C23 for ; Tue, 2 Mar 2021 13:14:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F21D63840C23 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 9D8DC30130CA; Tue, 2 Mar 2021 14:14:11 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 88026402414E; Tue, 2 Mar 2021 14:14:11 +0100 (CET) Message-ID: <6f7e9bc184371711bd409aff2a5c744fc33355a1.camel@klomp.org> Subject: Re: [PATCH] Fix assert after goto failure From: Mark Wielaard To: Tom de Vries , dwz@sourceware.org, jakub@redhat.com Date: Tue, 02 Mar 2021 14:14:11 +0100 In-Reply-To: <20210301124429.GA14163@delia> References: <20210301124429.GA14163@delia> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 13:14:14 -0000 Hi Tom, On Mon, 2021-03-01 at 13:44 +0100, Tom de Vries wrote: > This is because cleanup is not called. >=20 > Fix this by moving the failure label up one line. >=20 > Any comments? This looks consistent with how the rest of the code paths calls cleanup before returning an error. Thanks, Mark > Fix assert after goto failure >=20 > 2021-03-01 Tom de Vries >=20 > * dwz.c (dwz): Move failure label to before cleanup. >=20 > --- > dwz.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/dwz.c b/dwz.c > index 8eb4f1d..d5fe7b1 100644 > --- a/dwz.c > +++ b/dwz.c > @@ -15434,8 +15434,8 @@ dwz (const char *file, const char *outfile, > struct file_result *res, > } > else if (write_aranges (dso)) > { > - cleanup (); > failure: > + cleanup (); > ret =3D 1; > } > else