summaryrefslogtreecommitdiff
path: root/packaging/0025-Revert-TLS-model-change-of-the-gCurrentThreadInfo.patch
blob: 38d416720fd5b582b89ba40348d47a3868e10b1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 459e054044ede83560f9295bce5556f64b00e5c2 Mon Sep 17 00:00:00 2001
From: Jan Vorlicek <janvorli@microsoft.com>
Date: Wed, 21 Feb 2018 02:02:30 +0100
Subject: [PATCH 25/47] Revert TLS model change of the gCurrentThreadInfo

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vm/threads.inl b/src/vm/threads.inl
index 0105955..26682ec 100644
--- a/src/vm/threads.inl
+++ b/src/vm/threads.inl
@@ -27,7 +27,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()
-- 
2.7.4