From: Julian Seward Date: Tue, 4 Jun 2002 17:11:03 +0000 (+0000) Subject: More assertion-failure avoidance in the stabs reader. X-Git-Tag: svn/VALGRIND_1_0_3~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35ae79b60b1709655078cde83396c66db5975ddc;p=thirdparty%2Fvalgrind.git More assertion-failure avoidance in the stabs reader. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@377 --- diff --git a/coregrind/vg_symtab2.c b/coregrind/vg_symtab2.c index 5e3b8384cd..4e37f39f2a 100644 --- a/coregrind/vg_symtab2.c +++ b/coregrind/vg_symtab2.c @@ -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); diff --git a/vg_symtab2.c b/vg_symtab2.c index 5e3b8384cd..4e37f39f2a 100644 --- a/vg_symtab2.c +++ b/vg_symtab2.c @@ -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);