File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,14 @@ namespace v8 {
23
23
namespace internal {
24
24
namespace trap_handler {
25
25
26
- THREAD_LOCAL bool g_thread_in_wasm_code = false ;
26
+ // We declare this as int rather than bool as a workaround for a glibc bug, in
27
+ // which the dynamic loader cannot handle executables whose TLS area is only
28
+ // 1 byte in size; see https://sourceware.org/bugzilla/show_bug.cgi?id=14898.
29
+ THREAD_LOCAL int g_thread_in_wasm_code = false ;
30
+
31
+ static_assert (sizeof (g_thread_in_wasm_code) > 1 ,
32
+ " sizeof(thread_local_var) must be > 1, see "
33
+ " https://sourceware.org/bugzilla/show_bug.cgi?id=14898" );
27
34
28
35
size_t gNumCodeObjects = 0 ;
29
36
CodeProtectionInfoListEntry* gCodeObjects = nullptr ;
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ inline bool UseTrapHandler() {
65
65
return FLAG_wasm_trap_handler && V8_TRAP_HANDLER_SUPPORTED;
66
66
}
67
67
68
- extern THREAD_LOCAL bool g_thread_in_wasm_code;
68
+ extern THREAD_LOCAL int g_thread_in_wasm_code;
69
69
70
70
inline bool IsThreadInWasm () { return g_thread_in_wasm_code; }
71
71
You can’t perform that action at this time.
0 commit comments