Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2016-12-19 19:19:40 +0300
committerGitHub <noreply@github.com>2016-12-19 19:19:40 +0300
commit65846c0008f13b0e4b940d2cc293ed914fc28f9e (patch)
tree18e6a2d0ce3fcf73d7543b2caeb43663335470d1 /src/Native/Runtime/EHHelpers.cpp
parent301a7e28ef77393d4cf505c9ec2c663c360caba5 (diff)
Unconditionally disable incremental linking on Windows (#2376)
The runtime is not compatible with jump stubs inserted by incremental linking, and it does not seem to be helping us much anyway. Fixes #2348
Diffstat (limited to 'src/Native/Runtime/EHHelpers.cpp')
-rw-r--r--src/Native/Runtime/EHHelpers.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Native/Runtime/EHHelpers.cpp b/src/Native/Runtime/EHHelpers.cpp
index bf2d1ce70..65d8a6cb0 100644
--- a/src/Native/Runtime/EHHelpers.cpp
+++ b/src/Native/Runtime/EHHelpers.cpp
@@ -337,6 +337,12 @@ static bool InWriteBarrierHelper(UIntNative faultingIP)
// compare the IP against the list of known possible AV locations in the write barrier helpers
for (size_t i = 0; i < sizeof(writeBarrierAVLocations)/sizeof(writeBarrierAVLocations[0]); i++)
{
+#if defined(_AMD64_) || defined(_X86_)
+ // Verify that the runtime is not linked with incremental linking enabled. Incremental linking
+ // wraps every method symbol with a jump stub that breaks the following check.
+ ASSERT(*(UInt8*)writeBarrierAVLocations[i] != 0xE9); // jmp XXXXXXXX
+#endif
+
if (writeBarrierAVLocations[i] == faultingIP)
return true;
}