Commit 613033ba authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Stop trying to setrlimit(RLIMIT_AS) in ASAN builds

Summary:
[Folly] Stop trying to `setrlimit(RLIMIT_AS)` in ASAN builds.

ASAN needs to reserve plenty of memory outside of the limited address space imposed by the call to `setrlimit`.

Reviewed By: andriigrynenko

Differential Revision: D5014679

fbshipit-source-id: 2ab71b1cca9297d3a276cf72154fac30a2057f86
parent 90230f14
......@@ -146,7 +146,9 @@ TEST(RetryingTest, large_retries) {
rlimit newMemLimit;
newMemLimit.rlim_cur = std::min(1UL << 30, oldMemLimit.rlim_max);
newMemLimit.rlim_max = oldMemLimit.rlim_max;
if (!folly::kIsSanitizeAddress) { // ASAN reserves outside of the rlimit
PCHECK(setrlimit(RLIMIT_AS, &newMemLimit) == 0);
}
SCOPE_EXIT {
PCHECK(setrlimit(RLIMIT_AS, &oldMemLimit) == 0);
};
......
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