]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
ML_(read_elf_debug_info): if we exit from this routine via the BAD
authorJulian Seward <jseward@acm.org>
Sat, 10 Sep 2011 11:20:26 +0000 (11:20 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 10 Sep 2011 11:20:26 +0000 (11:20 +0000)
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

coregrind/m_debuginfo/readelf.c

index 141b2555f3b13e7eb6073c608d95de086ff7e178..3338fe43e87528acbb286be2007470f5f99c65eb 100644 (file)
@@ -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)