summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-11-17 09:50:33 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-11-19 11:57:36 -0500
commitdeed8e310cecb2491e5c333afc58cb720a39b565 (patch)
treec284529f2e11797b5139d4a33491d10d353e8395
parentc819c0e413069cb4e16236fb3e6576658060a17d (diff)
downloadhaskell-deed8e310cecb2491e5c333afc58cb720a39b565.tar.gz
nonmoving: Fix incorrect masking in mark queue type test
We were using TAG_BITS instead of TAG_MASK. This happened to work on 64-bit platforms where TAG_BITS==3 since we only use tag values 0 and 3. However, this broken on 32-bit platforms where TAG_BITS==2.
-rw-r--r--rts/sm/NonMovingMark.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/sm/NonMovingMark.h b/rts/sm/NonMovingMark.h
index fe150f47cb..36158ec917 100644
--- a/rts/sm/NonMovingMark.h
+++ b/rts/sm/NonMovingMark.h
@@ -69,10 +69,10 @@ INLINE_HEADER enum EntryType nonmovingMarkQueueEntryType(MarkQueueEnt *ent)
{
if (ent->null_entry.p == NULL) {
return NULL_ENTRY;
- } else if (((uintptr_t) ent->mark_closure.origin & TAG_BITS) == 0) {
+ } else if (((uintptr_t) ent->mark_closure.origin & TAG_MASK) == 0) {
return MARK_CLOSURE;
} else {
- ASSERT((ent->mark_array.start_index & TAG_BITS) == 0x3);
+ ASSERT((ent->mark_array.start_index & TAG_MASK) == 0x3);
return MARK_ARRAY;
}
}