]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
More assertion-failure avoidance in the stabs reader.
authorJulian Seward <jseward@acm.org>
Tue, 4 Jun 2002 17:11:03 +0000 (17:11 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 4 Jun 2002 17:11:03 +0000 (17:11 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@377

coregrind/vg_symtab2.c
vg_symtab2.c

index 5e3b8384cd4dd3fed8cf1108420294036a1f54f1..4e37f39f2acb54d72d4bf6f1265f4dcce611e230 100644 (file)
@@ -277,6 +277,14 @@ void addLineInfo ( SegInfo* si,
        size = 1;
    }
 
+   /* hack! */
+   if (this >= 0 && this <= 100) {
+       VG_(message)(Vg_DebugMsg, 
+                    "warning: ignoring bogus stabs entry "
+                    "%p %p %d: %d", this, next, entry, size);
+       return;
+   }
+
    vg_assert(this < si->start + si->size && next-1 >= si->start);
    vg_assert(lineno >= 0 && lineno <= MAX_LINENO);
 
index 5e3b8384cd4dd3fed8cf1108420294036a1f54f1..4e37f39f2acb54d72d4bf6f1265f4dcce611e230 100644 (file)
@@ -277,6 +277,14 @@ void addLineInfo ( SegInfo* si,
        size = 1;
    }
 
+   /* hack! */
+   if (this >= 0 && this <= 100) {
+       VG_(message)(Vg_DebugMsg, 
+                    "warning: ignoring bogus stabs entry "
+                    "%p %p %d: %d", this, next, entry, size);
+       return;
+   }
+
    vg_assert(this < si->start + si->size && next-1 >= si->start);
    vg_assert(lineno >= 0 && lineno <= MAX_LINENO);