From a8e108e233195ffce2f2a80633f37a8a3ca03e0b Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 8 Oct 2016 12:08:19 -0700 Subject: [PATCH] Workaround arm64/clang crashes by avoiding TLS. We only use it in these two places, it should be okay for now. Still not working on r13 on a SHIELD TV. --- Common/Misc.cpp | 4 ++++ ext/native/thread/threadutil.cpp | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Common/Misc.cpp b/Common/Misc.cpp index 9c711cd90..6c62a0602 100644 --- a/Common/Misc.cpp +++ b/Common/Misc.cpp @@ -23,6 +23,10 @@ #if defined(__APPLE__) || defined(__SYMBIAN32__) #define __thread #endif +// Experiencing emutls crashes on ARM64 Android, so disabling for now. +#if defined(ANDROID) && !defined(ARM64) +#define __thread +#endif #ifdef _WIN32 #include "CommonWindows.h" diff --git a/ext/native/thread/threadutil.cpp b/ext/native/thread/threadutil.cpp index c0ff13f04..ac7f90d6a 100644 --- a/ext/native/thread/threadutil.cpp +++ b/ext/native/thread/threadutil.cpp @@ -1,7 +1,8 @@ #ifdef _WIN32 #include #define TLS_SUPPORTED -#elif defined(ANDROID) +// Experiencing emutls crashes on ARM64 Android, so disabling for now. +#elif defined(ANDROID) && !defined(ARM64) #define TLS_SUPPORTED #endif