diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-11-17 09:50:33 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-11-19 11:57:36 -0500 |
commit | deed8e310cecb2491e5c333afc58cb720a39b565 (patch) | |
tree | c284529f2e11797b5139d4a33491d10d353e8395 | |
parent | c819c0e413069cb4e16236fb3e6576658060a17d (diff) | |
download | haskell-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.h | 4 |
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; } } |