diff options
author | Ed Maste <emaste@FreeBSD.org> | 2015-02-09 01:44:09 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2015-02-09 01:44:09 +0000 |
commit | 12bd4897ff0678fa663e09d78ebc22dd255ceb86 (patch) | |
tree | a8f4b3abea3e6937e60728991c736e6e3d322fc1 /source/Host/common/ThreadLauncher.cpp | |
parent | 205afe679855a4ce8149cdaa94d3f0868ce796dc (diff) |
Notes
Diffstat (limited to 'source/Host/common/ThreadLauncher.cpp')
-rw-r--r-- | source/Host/common/ThreadLauncher.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/Host/common/ThreadLauncher.cpp b/source/Host/common/ThreadLauncher.cpp index ec7da325bf92..c19a23361d81 100644 --- a/source/Host/common/ThreadLauncher.cpp +++ b/source/Host/common/ThreadLauncher.cpp @@ -38,6 +38,16 @@ ThreadLauncher::LaunchThread(llvm::StringRef name, lldb::thread_func_t thread_fu error.SetError(::GetLastError(), eErrorTypeWin32); #else + + // ASAN instrumentation adds a lot of bookkeeping overhead on stack frames. +#if __has_feature(address_sanitizer) + const size_t eight_megabytes = 8 * 1024 * 1024; + if (min_stack_byte_size < eight_megabytes) + { + min_stack_byte_size += eight_megabytes; + } +#endif + pthread_attr_t *thread_attr_ptr = NULL; pthread_attr_t thread_attr; bool destroy_attr = false; |