From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5251 invoked by alias); 8 Jun 2018 14:07:01 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 5238 invoked by uid 89); 8 Jun 2018 14:07:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.4 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Jun 2018 14:06:59 +0000 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 AD928301470D; Fri, 8 Jun 2018 16:06:57 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id A74FF413CB92; Fri, 8 Jun 2018 16:06:57 +0200 (CEST) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: Mark Wielaard Subject: [PATCH] tests: Fix cfi_debug_bias assert in varlocs. Date: Fri, 08 Jun 2018 14:07:00 -0000 Message-Id: <1528466815-20352-1-git-send-email-mark@klomp.org> X-Mailer: git-send-email 1.8.3.1 X-Spam-Flag: NO X-IsSubscribed: yes X-SW-Source: 2018-q2/txt/msg00183.txt.bz2 It is only a consistency issue if we actually have an cfi_debug and the cfi_debug_bias is not zero (because they come from the same file as the other debug data). Signed-off-by: Mark Wielaard --- tests/ChangeLog | 5 +++++ tests/varlocs.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index a2adfee..25ed41e 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2018-06-08 Mark Wielaard + + * varlocs.c (main): Only assert when cfi_debug_bias != 0 if there + actually is a cfi_debug. + 2018-06-07 Mark Wielaard * run-readelf-loc.sh: Fix expected output for startx_length. diff --git a/tests/varlocs.c b/tests/varlocs.c index 2ddd3d8..99c3887 100644 --- a/tests/varlocs.c +++ b/tests/varlocs.c @@ -1121,7 +1121,8 @@ main (int argc, char *argv[]) cfi_debug = dwfl_module_dwarf_cfi (mod, &cfi_debug_bias); cfi_eh = dwfl_module_eh_cfi (mod, &cfi_eh_bias); - assert (cfi_debug_bias == 0); // No bias needed, same file. + // No bias needed, same file. + assert (cfi_debug == NULL || cfi_debug_bias == 0); // We are a bit forgiving for object files. There might be // relocations we don't handle that are needed in some -- 1.8.3.1