Fix "Assertion '!di->soname' failed" on weird files.

Fixes #320661.  (Jiří Hruška, jirka@fud.cz)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13640
This commit is contained in:
Julian Seward 2013-10-14 12:02:15 +00:00
parent 3fd8c455b3
commit 5f16bea2a7

View File

@ -1654,6 +1654,13 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di )
if (!loaded) {
ML_(symerr)(di, False,
"ELF section outside all mapped regions");
/* This problem might be solved by further memory mappings.
Avoid the vg_assert(!di->soname) at the beginning of this
function if DYNAMIC section has been already processed. */
if (di->soname) {
ML_(dinfo_free)(di->soname);
di->soname = NULL;
}
goto out;
}
}