From 794d4e3d285ff68479c7611ea9c0051de3d88655 Mon Sep 17 00:00:00 2001 From: Rahul Kumar Date: Wed, 17 Aug 2016 19:37:23 -0700 Subject: [PATCH] Due to comdat folding some fcalls are pointing to same code. This fix ensures that these fcall has a unique code address. (dotnet/coreclr#6776) Commit migrated from https://github.com/dotnet/coreclr/commit/473d6f1e7e30b56aaa7677da45163bc567210a62 --- src/coreclr/src/vm/runtimehandles.cpp | 6 ++++++ src/coreclr/src/vm/stubhelpers.cpp | 1 + 2 files changed, 7 insertions(+) diff --git a/src/coreclr/src/vm/runtimehandles.cpp b/src/coreclr/src/vm/runtimehandles.cpp index 39600ca..68ad24c 100644 --- a/src/coreclr/src/vm/runtimehandles.cpp +++ b/src/coreclr/src/vm/runtimehandles.cpp @@ -328,7 +328,10 @@ FCIMPL3(void, RuntimeMethodHandle::CheckLinktimeDemands, ReflectMethodObject *pM CONTRACTL_END; if(!Security::IsTransparencyEnforcementEnabled()) + { + FCUnique(0xb0); return; + } REFLECTMETHODREF refMethod = (REFLECTMETHODREF)ObjectToOBJECTREF(pMethodUNSAFE); REFLECTMODULEBASEREF refModule = (REFLECTMODULEBASEREF)ObjectToOBJECTREF(pModuleUNSAFE); @@ -846,7 +849,10 @@ void QCALLTYPE RuntimeFieldHandle::CheckAttributeAccess(FieldDesc *pFD, QCall::M CONTRACTL_END; if(!Security::IsTransparencyEnforcementEnabled()) + { + FCUnique(0xb1); return; + } BEGIN_QCALL; diff --git a/src/coreclr/src/vm/stubhelpers.cpp b/src/coreclr/src/vm/stubhelpers.cpp index abf2143..6e7fb49 100644 --- a/src/coreclr/src/vm/stubhelpers.cpp +++ b/src/coreclr/src/vm/stubhelpers.cpp @@ -2170,6 +2170,7 @@ FCIMPLEND FCIMPL2(void, StubHelpers::MulticastDebuggerTraceHelper, Object* element, INT32 count) { FCALL_CONTRACT; + FCUnique(0xa5); } FCIMPLEND #endif // FEATURE_STUBS_AS_IL -- 2.7.4