Use DynamicSecurityMethod attribute to mark methods with StackCrawlMark
authorJan Kotas <jkotas@microsoft.com>
Fri, 10 Feb 2017 09:10:23 +0000 (01:10 -0800)
committerJan Kotas <jkotas@microsoft.com>
Fri, 10 Feb 2017 22:18:33 +0000 (14:18 -0800)
commitccfb074ac5b7711de316a309504d30ae5d15fa0b
tree4412c94e275ea4a550666213b5865c202c64a6bf
parent5670d83185101978f7753fa08a02f3dcbca6cc41
Use DynamicSecurityMethod attribute to mark methods with StackCrawlMark

CoreCLR does not have CAS, and so we can conveniently use it to mark methods with StackCrawlMark to
decouple it from NoInlining. The original purpose of DynamicSecurityMethod was to disable inlining
of the caller and to insert CAS security checks, so we are basically just keeping the first part.

Fixes dotnet/coreclr#8102

Commit migrated from https://github.com/dotnet/coreclr/commit/49d2d8f711286bf4ab3ffcd7b9f89a2ec80725bd
20 files changed:
src/coreclr/src/mscorlib/src/System/Activator.cs
src/coreclr/src/mscorlib/src/System/AppDomain.cs
src/coreclr/src/mscorlib/src/System/Delegate.cs
src/coreclr/src/mscorlib/src/System/Environment.cs
src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs
src/coreclr/src/mscorlib/src/System/Reflection/ConstructorInfo.cs
src/coreclr/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs
src/coreclr/src/mscorlib/src/System/Reflection/Emit/DynamicMethod.cs
src/coreclr/src/mscorlib/src/System/Reflection/MethodBase.cs
src/coreclr/src/mscorlib/src/System/Reflection/MethodInfo.cs
src/coreclr/src/mscorlib/src/System/Resources/ManifestBasedResourceGroveler.cs
src/coreclr/src/mscorlib/src/System/Resources/ResourceManager.cs
src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs
src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/RuntimeEnvironment.cs
src/coreclr/src/mscorlib/src/System/Security/Attributes.cs
src/coreclr/src/mscorlib/src/System/Threading/Thread.cs
src/coreclr/src/mscorlib/src/System/Threading/ThreadPool.cs
src/coreclr/src/mscorlib/src/System/ThrowHelper.cs
src/coreclr/src/mscorlib/src/System/Type.cs
src/coreclr/src/vm/jitinterface.cpp