Skip to content

Commit 71ca582

Browse files
committed
Fix #10701 & 10838
1 parent 3385c79 commit 71ca582

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/gc/gc.d

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2630,7 +2630,7 @@ struct Gcx
26302630
toClear |= GCBits.BITS_1 << clearIndex;
26312631

26322632
List *list = cast(List *)p;
2633-
debug(PRINTF) printf("\tcollecting %p\n", list);
2633+
debug(COLLECT_PRINTF) printf("\tcollecting %p\n", list);
26342634
log_free(sentinel_add(list));
26352635

26362636
debug (MEMSTOMP) memset(p, 0xF3, size);
@@ -2744,11 +2744,15 @@ struct Gcx
27442744
{
27452745
biti = (offset & notbinsize[bins]) >> pool.shiftBy;
27462746
}
2747-
else
2747+
else if(bins == B_PAGEPLUS)
27482748
{
27492749
pn -= pool.bPageOffsets[pn];
27502750
biti = pn * (PAGESIZE >> pool.shiftBy);
27512751
}
2752+
else // bins == B_FREE
2753+
{
2754+
return IsMarked.no;
2755+
}
27522756
return pool.mark.test(biti) ? IsMarked.yes : IsMarked.no;
27532757
}
27542758
return IsMarked.unknown;

0 commit comments

Comments
 (0)