diff options
author | Mark Wielaard <mjw@redhat.com> | 2012-10-01 16:12:10 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2012-10-01 17:33:07 +0200 |
commit | ea45ac8e1d937b727122a0a286ad9b37f02fe0a2 (patch) | |
tree | f3279f4be449884e538857cddbe5f56834492009 | |
parent | 5b25782ecd5a9d60373878f887cee65d55d98e76 (diff) | |
download | elfutils-ea45ac8e1d937b727122a0a286ad9b37f02fe0a2.tar.gz |
cu.c (cudie_offset): Don't use type_sig8, it might not be initialized.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
-rw-r--r-- | libdwfl/ChangeLog | 5 | ||||
-rw-r--r-- | libdwfl/cu.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 7f2c7778..403b0ec7 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,5 +1,10 @@ 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 accessing it. diff --git a/libdwfl/cu.c b/libdwfl/cu.c index 2e985686..18fc2060 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 |