From: Nicholas Nethercote Date: Mon, 13 Sep 2004 12:16:06 +0000 (+0000) Subject: Fix off-by-one error when counting the number of BBs executed. X-Git-Tag: svn/VALGRIND_3_0_0~1577 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94f626e3ecacc06267ab589ddc97562aade3bf55;p=thirdparty%2Fvalgrind.git Fix off-by-one error when counting the number of BBs executed. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2710 --- diff --git a/coregrind/vg_scheduler.c b/coregrind/vg_scheduler.c index 7a93ce8ec1..1cac4f95d9 100644 --- a/coregrind/vg_scheduler.c +++ b/coregrind/vg_scheduler.c @@ -1004,8 +1004,8 @@ VgSchedReturnCode do_scheduler ( Int* exitcode, ThreadId* last_run_tid ) non-completely-trivial reason. First, update basic-block counters. */ - done_this_time = (Int)dispatch_ctr_SAVED - (Int)VG_(dispatch_ctr) - 1; - vg_assert(done_this_time >= 0); + done_this_time = (Int)dispatch_ctr_SAVED - (Int)VG_(dispatch_ctr); + vg_assert(done_this_time > 0); VG_(bbs_done) += (ULong)done_this_time; if (0 && trc != VG_TRC_INNER_FASTMISS)