]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
cu.c (cudie_offset): Don't use type_sig8, it might not be initialized.
authorMark Wielaard <mjw@redhat.com>
Mon, 1 Oct 2012 14:12:10 +0000 (16:12 +0200)
committerMark Wielaard <mjw@redhat.com>
Mon, 1 Oct 2012 15:33:07 +0000 (17:33 +0200)
Signed-off-by: Mark Wielaard <mjw@redhat.com>
libdwfl/ChangeLog
libdwfl/cu.c

index 7f2c7778834ea3bcbfc468cba37a52430d96188b..403b0ec7b617ea0116610deb99f7d432f3dd90aa 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-01  Mark Wielaard  <mjw@redhat.com>
+
+       * 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  <mjw@redhat.com>
 
        * derelocate.c (find_section): Check next section exists before
index 2e985686ce2f19391d6411bbf896d3d73241725a..18fc2060432a53a483fa725e6412f27b63e39da8 100644 (file)
@@ -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