Hi Jonathon, Thanks for checking our new mailinglist settings :) You message was accepted now and the HTML attachment stripped.
On Sun, 2019-08-25 at 20:24 -0500, Jonathon Anderson wrote: > The one extra line in dwarf_getcfi.c > is to account for a failure in the test suite when Valgrind is > enabled (didn't catch it the first time around). That is an interesting catch. And obviously a latent bug. It works if things are in the first memblock (as part of the larger Dwarf struct), since that is allocated with calloc, and so zeroed out. But if the cfi would get into a later memblock it would get a random value, since those are malloced. In your patch the memblocks are always malloced, and so the bug shows up immediately. Lets just cherry-pick this fixup since it is a good fixup to have. Does the attached look correct? Thanks, Mark
From 4bcc641d362de4236ae8f0f5bc933c6d84b6f105 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson <jm...@rice.edu> Date: Sun, 25 Aug 2019 10:07:00 -0500 Subject: [PATCH] libdw: fix latent bug in dwarf_getcfi.c not setting default_same_value. Signed-off-by: Jonathon Anderson <jm...@rice.edu> --- libdw/ChangeLog | 4 ++++ libdw/dwarf_getcfi.c | 1 + 2 files changed, 5 insertions(+) diff --git a/libdw/ChangeLog b/libdw/ChangeLog index bf1f4857..1d3586f0 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,7 @@ +2019-08-25 Jonathon Anderson <jm...@rice.edu> + + * dwarf_getcfi.c (dwarf_getcfi): Set default_same_value to false. + 2019-08-12 Mark Wielaard <m...@klomp.org> * libdw.map (ELFUTILS_0.177): Add new version of dwelf_elf_begin. diff --git a/libdw/dwarf_getcfi.c b/libdw/dwarf_getcfi.c index 9aed403e..51932cd9 100644 --- a/libdw/dwarf_getcfi.c +++ b/libdw/dwarf_getcfi.c @@ -58,6 +58,7 @@ dwarf_getcfi (Dwarf *dbg) cfi->e_ident = (unsigned char *) elf_getident (dbg->elf, NULL); cfi->other_byte_order = dbg->other_byte_order; + cfi->default_same_value = false; cfi->next_offset = 0; cfi->cie_tree = cfi->fde_tree = cfi->expr_tree = NULL; -- 2.18.1