Extend the OS X pthread_get_stacksize_np workaround to 10.10
authorKuba Brecka <kuba.brecka@gmail.com>
Wed, 5 Nov 2014 18:55:38 +0000 (18:55 +0000)
committerKuba Brecka <kuba.brecka@gmail.com>
Wed, 5 Nov 2014 18:55:38 +0000 (18:55 +0000)
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

compiler-rt/lib/sanitizer_common/sanitizer_mac.cc

index f50c2a1..1b77087 100644 (file)
@@ -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);