increase stack size when TSAN is enabled
authorIgor Sugak <sugak@fb.com>
Fri, 1 Sep 2017 20:23:11 +0000 (13:23 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 1 Sep 2017 20:35:38 +0000 (13:35 -0700)
Reviewed By: meyering

Differential Revision: D5757469

fbshipit-source-id: ad70c47251993c79a502d30f312534e28c9241d4

folly/fibers/FiberManagerInternal-inl.h

index 0b423a13863f87a5218a831955fcb851136d5902..20aa1d9d756d576b45ba2132cb06ca0cdcc8d42b 100644 (file)
@@ -37,8 +37,9 @@ namespace fibers {
 namespace {
 
 inline FiberManager::Options preprocessOptions(FiberManager::Options opts) {
-#if defined(FOLLY_SANITIZE_ADDRESS) || defined(UNDEFINED_SANITIZER)
-  /* ASAN/UBSAN needs a lot of extra stack space.
+#if defined(FOLLY_SANITIZE_ADDRESS) || defined(UNDEFINED_SANITIZER) || \
+    defined(FOLLY_SANITIZE_THREAD)
+  /* Sanitizers need a lot of extra stack space.
      16x is a conservative estimate, 8x also worked with tests
      where it mattered.  Note that overallocating here does not necessarily
      increase RSS, since unused memory is pretty much free. */