Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -525,16 +525,21 @@ private Dictionary<int, List<BaseGcTransition>> GetTransitions(byte[] image, ref
int totalInterruptibleLength = 0;
if (NumInterruptibleRanges == 0)
{
totalInterruptibleLength = CodeLength;
totalInterruptibleLength = _gcInfoTypes.NormalizeCodeLength(CodeLength);
}
else
{
foreach (InterruptibleRange range in InterruptibleRanges)
{
totalInterruptibleLength += (int)(range.StopOffset - range.StartOffset);
uint normStart = _gcInfoTypes.NormalizeCodeOffset(range.StartOffset);
uint normStop = _gcInfoTypes.NormalizeCodeOffset(range.StopOffset);
totalInterruptibleLength += (int)(normStop - normStart);
}
}

if (SlotTable.NumTracked == 0)
return new Dictionary<int, List<BaseGcTransition>>();

int numChunks = (totalInterruptibleLength + _gcInfoTypes.NUM_NORM_CODE_OFFSETS_PER_CHUNK - 1) / _gcInfoTypes.NUM_NORM_CODE_OFFSETS_PER_CHUNK;
int numBitsPerPointer = (int)NativeReader.DecodeVarLengthUnsigned(image, _gcInfoTypes.POINTER_SIZE_ENCBASE, ref bitOffset);
if (numBitsPerPointer == 0)
Expand Down Expand Up @@ -629,6 +634,7 @@ private uint GetNumCouldBeLiveSlots(byte[] image, ref int bitOffset)
fSkip = !fSkip;
fReport = !fReport;
}
Debug.Assert(readSlots == numTracked);
}
else
{
Expand All @@ -642,6 +648,7 @@ private uint GetNumCouldBeLiveSlots(byte[] image, ref int bitOffset)
numCouldBeLiveSlots++;
}
}
Debug.Assert(numCouldBeLiveSlots > 0);
return numCouldBeLiveSlots;
}

Expand Down