Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 43056b5

Browse files
committed
Fix issues causing R2R dropouts
Don't ask for security checks when re calling getCallInfo. If we devirtualize a virtual call that went via ldvirtfn, change the call type to CT_USER_FUNC.
1 parent 398bc6e commit 43056b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/jit/importer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18682,6 +18682,7 @@ void Compiler::impDevirtualizeCall(GenTreeCall* call,
1868218682
call->gtFlags &= ~GTF_CALL_VIRT_VTABLE;
1868318683
call->gtFlags &= ~GTF_CALL_VIRT_STUB;
1868418684
call->gtCallMethHnd = derivedMethod;
18685+
call->gtCallType = CT_USER_FUNC;
1868518686

1868618687
// Virtual calls include an implicit null check, which we may
1868718688
// now need to make explicit. Not sure yet if we can restrict
@@ -18722,7 +18723,7 @@ void Compiler::impDevirtualizeCall(GenTreeCall* call,
1872218723
// Look up the new call info.
1872318724
CORINFO_CALL_INFO derivedCallInfo;
1872418725
eeGetCallInfo(&derivedResolvedToken, nullptr,
18725-
addVerifyFlag(combine(CORINFO_CALLINFO_SECURITYCHECKS, CORINFO_CALLINFO_ALLOWINSTPARAM)),
18726+
addVerifyFlag(CORINFO_CALLINFO_ALLOWINSTPARAM),
1872618727
&derivedCallInfo);
1872718728

1872818729
// Update the call.

0 commit comments

Comments
 (0)