Skip to content

Commit 09e5eb9

Browse files
tomeksowiVSadov
authored andcommitted
Early exit from GetTransitions like in gcinfodecoder.cpp
1 parent 7a7036e commit 09e5eb9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64

src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,9 @@ private Dictionary<int, List<BaseGcTransition>> GetTransitions(byte[] image, ref
537537
}
538538
}
539539

540+
if (SlotTable.NumTracked == 0)
541+
return new Dictionary<int, List<BaseGcTransition>>();
542+
540543
int numChunks = (totalInterruptibleLength + _gcInfoTypes.NUM_NORM_CODE_OFFSETS_PER_CHUNK - 1) / _gcInfoTypes.NUM_NORM_CODE_OFFSETS_PER_CHUNK;
541544
int numBitsPerPointer = (int)NativeReader.DecodeVarLengthUnsigned(image, _gcInfoTypes.POINTER_SIZE_ENCBASE, ref bitOffset);
542545
if (numBitsPerPointer == 0)

0 commit comments

Comments
 (0)