Commit ab8339ea authored by Robin Cheng's avatar Robin Cheng Committed by Facebook GitHub Bot

Fix TSAN crash for RetryingTest.

Summary: Like ASAN, TSAN also maps large memory regions. So disable the rlimit for TSAN as well.

Differential Revision: D22743326

fbshipit-source-id: 5023b66f1526894c77e6c693a2481f6ade388b9e
parent c5cff936
...@@ -232,7 +232,7 @@ TEST(RetryingTest, large_retries) { ...@@ -232,7 +232,7 @@ TEST(RetryingTest, large_retries) {
newMemLimit.rlim_cur = newMemLimit.rlim_cur =
std::min(static_cast<rlim_t>(1UL << 30), oldMemLimit.rlim_max); std::min(static_cast<rlim_t>(1UL << 30), oldMemLimit.rlim_max);
newMemLimit.rlim_max = oldMemLimit.rlim_max; newMemLimit.rlim_max = oldMemLimit.rlim_max;
if (!folly::kIsSanitizeAddress) { // ASAN reserves outside of the rlimit if (!folly::kIsSanitize) { // sanitizers reserve outside of the rlimit
PCHECK(setrlimit(RLIMIT_AS, &newMemLimit) == 0); PCHECK(setrlimit(RLIMIT_AS, &newMemLimit) == 0);
} }
SCOPE_EXIT { SCOPE_EXIT {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment