From: Mark Wielaard Date: Mon, 1 Oct 2012 14:12:10 +0000 (+0200) Subject: cu.c (cudie_offset): Don't use type_sig8, it might not be initialized. X-Git-Tag: elfutils-0.156~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea45ac8e1d937b727122a0a286ad9b37f02fe0a2;p=thirdparty%2Felfutils.git cu.c (cudie_offset): Don't use type_sig8, it might not be initialized. Signed-off-by: Mark Wielaard --- diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 7f2c77788..403b0ec7b 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,8 @@ +2012-10-01 Mark Wielaard + + * cu.c (cudie_offset): Don't use type_sig8, it might not be + initialized and these are always real CUs, never TUs. + 2012-10-01 Mark Wielaard * derelocate.c (find_section): Check next section exists before diff --git a/libdwfl/cu.c b/libdwfl/cu.c index 2e985686c..18fc20604 100644 --- a/libdwfl/cu.c +++ b/libdwfl/cu.c @@ -151,8 +151,12 @@ less_lazy (Dwfl_Module *mod) static inline Dwarf_Off cudie_offset (const struct dwfl_cu *cu) { + /* These are real CUs, so there never is a type_sig8. Note + initialization of dwkey.start and offset_size in intern_cu () + to see why this calculates the same value for both key and + die.cu search items. */ return DIE_OFFSET_FROM_CU_OFFSET (cu->die.cu->start, cu->die.cu->offset_size, - cu->die.cu->type_sig8 != 0); + 0); } static int