File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1000,7 +1000,11 @@ LargeHeapBlock::VerifyMark()
1000
1000
1001
1001
unsigned char attributes = header->GetAttributes (this ->heapInfo ->recycler ->Cookie );
1002
1002
1003
- Assert ((attributes & NewFinalizeBit) == 0 );
1003
+ // In case of OOM we may not have completed processing of trackable objects and the NewFinalizeBit may not have been cleared.
1004
+ if ((attributes & (TrackBit | NewTrackBit)) == (TrackBit | NewTrackBit))
1005
+ {
1006
+ Assert ((attributes & NewFinalizeBit) == 0 );
1007
+ }
1004
1008
1005
1009
if ((attributes & LeafBit) != 0 )
1006
1010
{
@@ -1981,7 +1985,12 @@ LargeHeapBlock::SweepObjects(Recycler * recycler)
1981
1985
if (heapBlockMap.IsMarked (header->GetAddress ()))
1982
1986
{
1983
1987
#if DBG
1984
- Assert ((header->GetAttributes (recycler->Cookie ) & NewFinalizeBit) == 0 );
1988
+ unsigned char attributes = header->GetAttributes (recycler->Cookie );
1989
+ // In case of OOM we may not have completed processing of trackable objects and the NewFinalizeBit may not have been cleared.
1990
+ if ((attributes & (TrackBit | NewTrackBit)) == (TrackBit | NewTrackBit))
1991
+ {
1992
+ Assert ((attributes & NewFinalizeBit) == 0 );
1993
+ }
1985
1994
#endif
1986
1995
1987
1996
RECYCLER_STATS_ADD (recycler, largeHeapBlockUsedByteCount, this ->GetHeaderByIndex (i)->objectSize );
You can’t perform that action at this time.
0 commit comments