From d5cb614270699f7a35002981e050b9b8b8a92f6b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 8 Nov 2016 23:33:52 +0100 Subject: 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 --- sal/osl/unx/thread.cxx | 4 +--- 1 file changed, 1 insertion(+), 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); -- cgit