summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorAndrew Au <andrewau@microsoft.com>2019-05-26 16:30:39 -0700
committerAndrew Au <cshung@gmail.com>2019-05-28 13:50:30 -0700
commitc690daea096f44d6563de58cd4b5d50cce83d9bf (patch)
treeb48e9928a66d976d073407acfafdc30c70d3548d /src/tools
parent156240d59b8acc277504fe43f148fe53e63f40bc (diff)
downloadcoreclr-c690daea096f44d6563de58cd4b5d50cce83d9bf.tar.gz
coreclr-c690daea096f44d6563de58cd4b5d50cce83d9bf.tar.bz2
coreclr-c690daea096f44d6563de58cd4b5d50cce83d9bf.zip
Fixing the epilog size decoding
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/r2rdump/Amd64/GcInfo.cs2
-rw-r--r--src/tools/r2rdump/GCInfoTypes.cs1
-rw-r--r--src/tools/r2rdump/R2RReader.cs14
3 files changed, 3 insertions, 14 deletions
diff --git a/src/tools/r2rdump/Amd64/GcInfo.cs b/src/tools/r2rdump/Amd64/GcInfo.cs
index 7ab9394174..0727c98279 100644
--- a/src/tools/r2rdump/Amd64/GcInfo.cs
+++ b/src/tools/r2rdump/Amd64/GcInfo.cs
@@ -119,7 +119,7 @@ namespace R2RDump.Amd64
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;
diff --git a/src/tools/r2rdump/GCInfoTypes.cs b/src/tools/r2rdump/GCInfoTypes.cs
index 10bad28bc0..f3bf54fe1e 100644
--- a/src/tools/r2rdump/GCInfoTypes.cs
+++ b/src/tools/r2rdump/GCInfoTypes.cs
@@ -79,6 +79,7 @@ namespace R2RDump
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;
diff --git a/src/tools/r2rdump/R2RReader.cs b/src/tools/r2rdump/R2RReader.cs
index edfbec05f2..6f61241999 100644
--- a/src/tools/r2rdump/R2RReader.cs
+++ b/src/tools/r2rdump/R2RReader.cs
@@ -553,19 +553,7 @@ namespace R2RDump
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)