From 665bd1c94610b6f9a95d23013edfd6f08860ea51 Mon Sep 17 00:00:00 2001 From: Jonghyun Park Date: Fri, 9 Dec 2016 10:48:07 +0900 Subject: [PATCH] [x86/Linux] Use Portable FastGetDomain FastGetDomain function (with __declspec(naked)) causes segmentation fault. --- src/vm/comsynchronizable.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vm/comsynchronizable.cpp b/src/vm/comsynchronizable.cpp index ef195bf5dea5..e62ec13dde42 100644 --- a/src/vm/comsynchronizable.cpp +++ b/src/vm/comsynchronizable.cpp @@ -1604,7 +1604,7 @@ FCIMPL0(Object*, ThreadNative::GetDomain) } FCIMPLEND -#ifdef _TARGET_X86_ +#if defined(_TARGET_X86_) && defined(_MSC_VER) __declspec(naked) LPVOID __fastcall ThreadNative::FastGetDomain() { STATIC_CONTRACT_MODE_COOPERATIVE; @@ -1624,7 +1624,7 @@ __declspec(naked) LPVOID __fastcall ThreadNative::FastGetDomain() ret } } -#else // _TARGET_X86_ +#else // _TARGET_X86_ && _MSC_VER LPVOID F_CALL_CONV ThreadNative::FastGetDomain() { CONTRACTL @@ -1650,7 +1650,7 @@ LPVOID F_CALL_CONV ThreadNative::FastGetDomain() } return NULL; } -#endif // _TARGET_X86_ +#endif // _TARGET_X86_ && _MSC_VER #ifdef FEATURE_REMOTING // This is just a helper method that lets BCL get to the managed context