From: Julian Seward Date: Sat, 10 Sep 2011 11:20:26 +0000 (+0000) Subject: ML_(read_elf_debug_info): if we exit from this routine via the BAD X-Git-Tag: svn/VALGRIND_3_7_0~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbfe39c975bcce38c0b5ae74610472a2a6b5f077;p=thirdparty%2Fvalgrind.git ML_(read_elf_debug_info): if we exit from this routine via the BAD macro, set di->soname back to NULL, so that if we later reenter with the same 'di', we don't fall over the initial di->soname == NULL assertion. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12023 --- diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c index 141b2555f3..3338fe43e8 100644 --- a/coregrind/m_debuginfo/readelf.c +++ b/coregrind/m_debuginfo/readelf.c @@ -1559,6 +1559,10 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) do { ML_(symerr)(di, True, \ "Can't make sense of " _secname \ " section mapping"); \ + /* make sure we don't assert if we find */ \ + /* ourselves back in this routine later, */ \ + /* with the same di */ \ + di->soname = NULL; \ goto out; \ } while (0)