From c8a355dc6c1f8211119ef149a069d803bd6a76f8 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 28 Apr 2016 04:35:47 -0700 Subject: Refuse to compile references to nativecallable methods in R2R images (#4627) --- src/zap/zapinfo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/zap') diff --git a/src/zap/zapinfo.cpp b/src/zap/zapinfo.cpp index eba29327a4..345a920902 100644 --- a/src/zap/zapinfo.cpp +++ b/src/zap/zapinfo.cpp @@ -2104,6 +2104,12 @@ void ZapInfo::getCallInfo(CORINFO_RESOLVED_TOKEN * pResolvedToken, m_zapper->Warning(W("ReadyToRun: Methods with security checks not supported\n")); ThrowHR(E_NOTIMPL); } + + if (GetCompileInfo()->IsNativeCallableMethod(pResult->hMethod)) + { + m_zapper->Warning(W("ReadyToRun: References to methods with NativeCallableAttribute not supported\n")); + ThrowHR(E_NOTIMPL); + } } #endif -- cgit v1.2.3