]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix off-by-one error when counting the number of BBs executed.
authorNicholas Nethercote <n.nethercote@gmail.com>
Mon, 13 Sep 2004 12:16:06 +0000 (12:16 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Mon, 13 Sep 2004 12:16:06 +0000 (12:16 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2710

coregrind/vg_scheduler.c

index 7a93ce8ec1003e045cbbd9098445fcb96b756a0d..1cac4f95d9fc008ebfeb15c2b739922130498b14 100644 (file)
@@ -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)