From: Jan Vorlicek Date: Tue, 27 Mar 2018 23:31:20 +0000 (+0200) Subject: Fix handling of FCalls in ExternalMethodFixupWorker (#17252) X-Git-Tag: accepted/tizen/unified/20190422.045933~2469 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65bf37cbbb7290c9f52402fa380b1d3a8dae6b83;p=platform%2Fupstream%2Fcoreclr.git 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. --- diff --git a/src/vm/method.cpp b/src/vm/method.cpp index 9b3080e..d323ef0 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 ||