Commit deed8e31 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

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.
parent c819c0e4
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment