]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix "Assertion '!di->soname' failed" on weird files.
authorJulian Seward <jseward@acm.org>
Mon, 14 Oct 2013 12:02:15 +0000 (12:02 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 14 Oct 2013 12:02:15 +0000 (12:02 +0000)
Fixes #320661.  (Jiří Hruška, jirka@fud.cz)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13640

coregrind/m_debuginfo/readelf.c

index 7cd4297e41a0c48c405af3a0d74b70523080cf0b..48b0e1ea03640aa371f669342fb6292e93b1fcb7 100644 (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;
                }
             }