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>2015-12-17 04:35:30 +0300
committerJan Kotas <jkotas@microsoft.com>2015-12-17 04:35:30 +0300
commit56cf1ba0d87cd08e57b40a4934cc05cf61cc5d04 (patch)
tree3d2aa29bde5cdb4a76341d7f49c568d016e192da /src/Native/Runtime/thread.h
parent6cf6977b884f47d004972910af4a39e07be2df53 (diff)
Fix GCStress
[tfs-changeset: 1558329]
Diffstat (limited to 'src/Native/Runtime/thread.h')
-rw-r--r--src/Native/Runtime/thread.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Native/Runtime/thread.h b/src/Native/Runtime/thread.h
index 2fe85c23f..1f9808e7f 100644
--- a/src/Native/Runtime/thread.h
+++ b/src/Native/Runtime/thread.h
@@ -10,14 +10,19 @@ class ThreadStore;
class CLREventStatic;
class Thread;
+// The offsets of some fields in the thread (in particular, m_pTransitionFrame) are known to the compiler and get
+// inlined into the code. Let's make sure they don't change just because we enable/disable server GC in a particular
+// runtime build.
+#define KEEP_THREAD_LAYOUT_CONSTANT
+
#if defined(_X86_) || defined(_ARM_)
-# ifdef FEATURE_SVR_GC
+# if defined(FEATURE_SVR_GC) || defined(KEEP_THREAD_LAYOUT_CONSTANT)
# define SIZEOF_ALLOC_CONTEXT 40
# else // FEATURE_SVR_GC
# define SIZEOF_ALLOC_CONTEXT 28
# endif // FEATURE_SVR_GC
#elif defined(_AMD64_) || defined(_ARM64_)
-# ifdef FEATURE_SVR_GC
+# if defined(FEATURE_SVR_GC) || defined(KEEP_THREAD_LAYOUT_CONSTANT)
# define SIZEOF_ALLOC_CONTEXT 56
# else // FEATURE_SVR_GC
# define SIZEOF_ALLOC_CONTEXT 40