if (_hasGSCookie)
{
uint normPrologSize = NativeReader.DecodeVarLengthUnsigned(image, _gcInfoTypes.NORM_PROLOG_SIZE_ENCBASE, ref bitOffset) + 1;
- uint normEpilogSize = NativeReader.DecodeVarLengthUnsigned(image, _gcInfoTypes.NORM_PROLOG_SIZE_ENCBASE, ref bitOffset);
+ uint normEpilogSize = NativeReader.DecodeVarLengthUnsigned(image, _gcInfoTypes.NORM_EPILOG_SIZE_ENCBASE, ref bitOffset);
ValidRangeStart = normPrologSize;
ValidRangeEnd = (uint)CodeLength - normEpilogSize;
internal int SIZE_OF_RETURN_KIND_FAT { get; } = 2;
internal int CODE_LENGTH_ENCBASE { get; } = 8;
internal int NORM_PROLOG_SIZE_ENCBASE { get; } = 5;
+ internal int NORM_EPILOG_SIZE_ENCBASE { get; } = 3;
internal int SECURITY_OBJECT_STACK_SLOT_ENCBASE { get; } = 6;
internal int GS_COOKIE_STACK_SLOT_ENCBASE { get; } = 6;
internal int PSP_SYM_STACK_SLOT_ENCBASE { get; } = 6;
unwindInfo = new Amd64.UnwindInfo(Image, unwindOffset);
if (isEntryPoint[runtimeFunctionId])
{
- try
- {
- gcInfo = new Amd64.GcInfo(Image, unwindOffset + unwindInfo.Size, Machine, R2RHeader.MajorVersion);
- }
- catch (OverflowException)
- {
- Console.WriteLine($"Warning: Could not parse GC Info for method: {method.SignatureString}");
- }
- catch (IndexOutOfRangeException)
- {
- Console.WriteLine($"Warning: Could not parse GC Info for method: {method.SignatureString}");
- }
-
+ gcInfo = new Amd64.GcInfo(Image, unwindOffset + unwindInfo.Size, Machine, R2RHeader.MajorVersion);
}
}
else if (Machine == Machine.I386)