|
From: <sv...@va...> - 2008-05-10 08:23:36
|
Author: bart
Date: 2008-05-10 09:22:20 +0100 (Sat, 10 May 2008)
New Revision: 8025
Log:
Bug fix: bm_equal() now also works if the first argument contains one or more bitmap structures that are entirely zero.
Modified:
trunk/exp-drd/drd_bitmap.c
Modified: trunk/exp-drd/drd_bitmap.c
===================================================================
--- trunk/exp-drd/drd_bitmap.c 2008-05-10 08:21:07 UTC (rev 8024)
+++ trunk/exp-drd/drd_bitmap.c 2008-05-10 08:22:20 UTC (rev 8025)
@@ -231,6 +231,12 @@
bm_access_range(bm, a1, a1 + 8, eLoad);
}
+void bm_access_range_store(struct bitmap* const bm,
+ const Addr a1, const Addr a2)
+{
+ bm_access_range(bm, a1, a2, eStore);
+}
+
void bm_access_store_1(struct bitmap* const bm, const Addr a1)
{
bm_access_aligned_store(bm, a1, 1);
@@ -265,12 +271,6 @@
bm_access_range(bm, a1, a1 + 8, eStore);
}
-void bm_access_range_store(struct bitmap* const bm,
- const Addr a1, const Addr a2)
-{
- bm_access_range(bm, a1, a2, eStore);
-}
-
Bool bm_has(const struct bitmap* const bm, const Addr a1, const Addr a2,
const BmAccessTypeT access_type)
{
@@ -769,11 +769,18 @@
for ( ; (bm2l_ref = VG_(OSetGen_Next)(lhs->oset)) != 0; )
{
- bm2l = bm2l_ref->bm2;
+ while (bm2l_ref
+ && (bm2l = bm2l_ref->bm2)
+ && bm2l
+ && ! bm_has_any_access(lhs,
+ bm2l->addr << ADDR0_BITS,
+ (bm2l->addr + 1) << ADDR0_BITS))
+ {
+ bm2l_ref = VG_(OSetGen_Next)(lhs->oset);
+ }
+ if (bm2l_ref == 0)
+ break;
tl_assert(bm2l);
- tl_assert(bm_has_any_access(lhs,
- bm2l->addr << ADDR0_BITS,
- (bm2l->addr + 1) << ADDR0_BITS));
#if 0
VG_(message)(Vg_DebugMsg, "bm_equal: at 0x%lx", bm2l->addr << ADDR0_BITS);
#endif
|