From 5f16bea2a762548fabc1444d4a1e06f5d827fb3b Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Mon, 14 Oct 2013 12:02:15 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20"Assertion=20'!di->soname'=20failed"=20on?= =?UTF-8?q?=20weird=20files.=20Fixes=20#320661.=20=20(Ji=C5=99=C3=AD=20Hru?= =?UTF-8?q?=C5=A1ka,=20jirka@fud.cz)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13640 --- coregrind/m_debuginfo/readelf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c index 7cd4297e4..48b0e1ea0 100644 --- a/coregrind/m_debuginfo/readelf.c +++ b/coregrind/m_debuginfo/readelf.c @@ -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; } }