summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-08 23:33:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-08 23:33:52 +0100
commitd5cb614270699f7a35002981e050b9b8b8a92f6b (patch)
tree85687f579f06c8de07c9d560b427ec7674125a3e /sal
parent79f6d01eb18dac81bbe229dde883fe7c06b89a40 (diff)
Use the larger stack size for ASan/UBSan builds on macOS, too
At least on my macOS 10.12.1, PTHREAD_STACK_MIN is 8192 (so stacksize was substantially smaller than 12MB), and without this change there were randomly looking failures in e.g. JunitTest_chart2_unoapi with a -fsanitize=address build. Change-Id: Icfe989a0e5097a9a0ae76c6e0f6ffcca18271245
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/thread.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx
index 10561fbe0592..deed11d8ca0a 100644
--- a/sal/osl/unx/thread.cxx
+++ b/sal/osl/unx/thread.cxx
@@ -277,10 +277,8 @@ static oslThread osl_thread_create_Impl (
#if defined OPENBSD
stacksize = 262144;
-#elif defined LINUX
- stacksize = 12 * 1024 * 1024; // 8MB is not enough for ASAN on x86-64
#else
- stacksize = 100 * PTHREAD_STACK_MIN;
+ stacksize = 12 * 1024 * 1024; // 8MB is not enough for ASAN on x86-64
#endif
if (pthread_attr_setstacksize(&attr, stacksize) != 0) {
pthread_attr_destroy(&attr);