[compiler-rt] r221380 - Extend the OS X pthread_get_stacksize_np workaround to 10.10

Kuba Brecka kuba.brecka at gmail.com
Wed Nov 5 10:55:38 PST 2014


Author: kuba.brecka
Date: Wed Nov  5 12:55:38 2014
New Revision: 221380

URL: http://llvm.org/viewvc/llvm-project?rev=221380&view=rev
Log:
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


Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc?rev=221380&r1=221379&r2=221380&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc Wed Nov  5 12:55:38 2014
@@ -160,7 +160,7 @@ void GetThreadStackTopAndBottom(bool at_
   // 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);





More information about the llvm-commits mailing list