More assertion-failure avoidance in the stabs reader.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@377 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_symtab2.c b/coregrind/vg_symtab2.c
index 5e3b838..4e37f39 100644
--- a/coregrind/vg_symtab2.c
+++ b/coregrind/vg_symtab2.c
@@ -277,6 +277,14 @@
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);