From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 98E29385480A for ; Mon, 22 Feb 2021 15:39:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 98E29385480A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B7E62AF8E; Mon, 22 Feb 2021 15:39:04 +0000 (UTC) Date: Mon, 22 Feb 2021 16:39:03 +0100 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com, mark@klomp.org Subject: [committed] Don't call die_odr_state with unnecessarily defined cu arg Message-ID: <20210222153902.GA412@delia.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: Mon, 22 Feb 2021 15:39:06 -0000 Hi, When compiling dwz with this patch: ... die_odr_state (dw_cu_ref cu, dw_die_ref die) { if (die->die_odr_state != ODR_UNKNOWN) - return die->die_odr_state; + { + assert (cu == NULL); + return die->die_odr_state; + } ... and running f.i. odr-struct.sh, we run into the abort. The recent commit 3312feb "Fix CK_BAD propagation for --odr" introduced this code: ... if (die_odr_state (die_cu (die), die) != ODR_NONE) die->u.p1.die_ref_hash = die->u.p1.die_hash; ... and there's no need to pass a CU argument, which makes the abort trigger. Fix this by passing a NULL CU instead. Committed to trunk. Thanks, - Tom Don't call die_odr_state with unnecessarily defined cu arg 2021-02-22 Tom de Vries * dwz.c (read_debug_info): Pass NULL CU to die_odr_state call. --- dwz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwz.c b/dwz.c index 076f39c..86863ce 100644 --- a/dwz.c +++ b/dwz.c @@ -7253,7 +7253,7 @@ read_debug_info (DSO *dso, int kind, unsigned int *die_count) { if (die->die_ck_state != CK_KNOWN) continue; - if (die_odr_state (die_cu (die), die) != ODR_NONE) + if (die_odr_state (NULL, die) != ODR_NONE) die->u.p1.die_ref_hash = die->u.p1.die_hash; else die->die_ref_hash_computed = 0;