diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2018-03-28 01:31:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-28 01:31:20 +0200 |
commit | 65bf37cbbb7290c9f52402fa380b1d3a8dae6b83 (patch) | |
tree | 9937988dfd36bbf45a48af26cc4d01482673626e /src/vm/method.cpp | |
parent | 289ebe644ef88aa04b2bf509833689b2bf01485a (diff) | |
download | coreclr-65bf37cbbb7290c9f52402fa380b1d3a8dae6b83.tar.gz coreclr-65bf37cbbb7290c9f52402fa380b1d3a8dae6b83.tar.bz2 coreclr-65bf37cbbb7290c9f52402fa380b1d3a8dae6b83.zip |
Fix handling of FCalls in ExternalMethodFixupWorker (#17252)
When running ready to run code on ARM, the ExternalMethodFixupWorker
doesn't handle the entrypoints of FCalls correctly. It tries to handle
them as compact entrypoints, but those use a different machine code
instructions and it results in an assert in debug / checked build.
This change detects the runtime supplied calls before trying to check
for the compact entrypoint.
Diffstat (limited to 'src/vm/method.cpp')
-rw-r--r-- | src/vm/method.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vm/method.cpp b/src/vm/method.cpp index 9b3080ec6c..d323ef0f40 100644 --- a/src/vm/method.cpp +++ b/src/vm/method.cpp @@ -4409,7 +4409,10 @@ BOOL MethodDescChunk::IsCompactEntryPointAtAddress(PCODE addr) if (fSpeculative INDEBUG(|| TRUE)) { #ifdef _TARGET_ARM_ - if (!IsCompactEntryPointAtAddress(addr)) + TADDR instrCodeAddr = PCODEToPINSTR(addr); + if (!IsCompactEntryPointAtAddress(addr) || + *PTR_BYTE(instrCodeAddr) != TEP_ENTRY_INSTR1_BYTE1 || + *PTR_BYTE(instrCodeAddr+1) != TEP_ENTRY_INSTR1_BYTE2) #else // _TARGET_ARM_ if ((addr & 3) != 1 || *PTR_BYTE(addr) != X86_INSTR_MOV_AL || |