Revert TLS model change of the gCurrentThreadInfo
authorJan Vorlicek <janvorli@microsoft.com>
Wed, 21 Feb 2018 01:02:30 +0000 (02:02 +0100)
committerJan Kotas <jkotas@microsoft.com>
Wed, 21 Feb 2018 03:13:46 +0000 (19:13 -0800)
This change causes crashes due to incorrect TLS variable initialization
on Alpine Linux. The initial-exec model that the variable was modified
to use recently cannot be safely used in shared libraries.

src/vm/threads.inl

index 0a72d83..f5a439c 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef __llvm__
 EXTERN_C __declspec(thread) ThreadLocalInfo gCurrentThreadInfo;
 #else // !__llvm__
-EXTERN_C __thread ThreadLocalInfo gCurrentThreadInfo __attribute__ ((tls_model("initial-exec")));
+EXTERN_C __thread ThreadLocalInfo gCurrentThreadInfo;
 #endif // !__llvm__
 
 EXTERN_C inline Thread* STDCALL GetThread()