From: Bart Van Assche Date: Fri, 2 May 2008 19:12:43 +0000 (+0000) Subject: Added yet another assertion statement. X-Git-Tag: svn/VALGRIND_3_4_0~645 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=903a3b320ac0492aed7f31e67b3af0201144b938;p=thirdparty%2Fvalgrind.git Added yet another assertion statement. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7992 --- diff --git a/exp-drd/drd_clientreq.c b/exp-drd/drd_clientreq.c index 7a7c5ec3bc..053c14c511 100644 --- a/exp-drd/drd_clientreq.c +++ b/exp-drd/drd_clientreq.c @@ -96,6 +96,11 @@ static Addr highest_used_stack_address(const ThreadId vg_tid) nframes = VG_(get_StackTrace)(vg_tid, ips, n_ips, sps, 0, 0); + /* Paranoia ... */ + tl_assert(VG_(thread_get_stack_max)(vg_tid) + - VG_(thread_get_stack_size)(vg_tid) <= VG_(get_SP)(vg_tid) + && VG_(get_SP)(vg_tid) <= VG_(thread_get_stack_max)(vg_tid)); + husa = (nframes >= 1 ? sps[nframes - 1] : VG_(get_SP)(vg_tid)); tl_assert(VG_(thread_get_stack_max)(vg_tid) - VG_(thread_get_stack_size)(vg_tid) <= husa