public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] tests: Fix cfi_debug_bias assert in varlocs.
@ 2018-06-08 14:07 Mark Wielaard
  2018-06-10 15:21 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2018-06-08 14:07 UTC (permalink / raw)
  To: elfutils-devel; +Cc: Mark Wielaard

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 <mark@klomp.org>
---
 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  <mark@klomp.org>
+
+	* varlocs.c (main): Only assert when cfi_debug_bias != 0 if there
+	actually is a cfi_debug.
+
 2018-06-07  Mark Wielaard  <mark@klomp.org>
 
 	* 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] tests: Fix cfi_debug_bias assert in varlocs.
  2018-06-08 14:07 [PATCH] tests: Fix cfi_debug_bias assert in varlocs Mark Wielaard
@ 2018-06-10 15:21 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2018-06-10 15:21 UTC (permalink / raw)
  To: elfutils-devel

On Fri, Jun 08, 2018 at 04:06:55PM +0200, Mark Wielaard wrote:
> 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).

Pushed to master.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-10 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-08 14:07 [PATCH] tests: Fix cfi_debug_bias assert in varlocs Mark Wielaard
2018-06-10 15:21 ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).