From: Kuba Brecka Date: Wed, 5 Nov 2014 18:55:38 +0000 (+0000) Subject: Extend the OS X pthread_get_stacksize_np workaround to 10.10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0078cea79251768a02f9ea5a9a8db1d0991ddb17;p=platform%2Fupstream%2Fllvm.git Extend the OS X pthread_get_stacksize_np workaround to 10.10 Fixes a failing ASan testcase (TestCases/stack-use-after-return.cc) on OS X 10.10. Reviewed at http://reviews.llvm.org/D6120 llvm-svn: 221380 --- diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc index f50c2a1..1b77087 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc @@ -160,7 +160,7 @@ void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top, // pthread_get_stacksize_np() returns an incorrect stack size for the main // thread on Mavericks. See // https://code.google.com/p/address-sanitizer/issues/detail?id=261 - if ((GetMacosVersion() == MACOS_VERSION_MAVERICKS) && at_initialization && + if ((GetMacosVersion() >= MACOS_VERSION_MAVERICKS) && at_initialization && stacksize == (1 << 19)) { struct rlimit rl; CHECK_EQ(getrlimit(RLIMIT_STACK, &rl), 0);