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

Fix livelock in AtForkTest when running under TSAN.

Summary: Use the forkInstrumented call when running under TSAN.

Reviewed By: yfeldblum

Differential Revision: D23787959

fbshipit-source-id: 159f8354ef9746b8374d6da12b22e389c2bc71f4
parent 068d3f6e
......@@ -34,7 +34,9 @@ TEST(ThreadLocal, AtFork) {
},
[] {},
[] {});
auto pid = fork();
auto pid = folly::kIsSanitizeThread
? folly::detail::AtFork::forkInstrumented(fork)
: fork();
if (pid) {
int status;
auto pid2 = wait(&status);
......@@ -84,7 +86,9 @@ TEST(ThreadLocal, AtForkOrdering) {
});
while (!started) {
}
auto pid = fork();
auto pid = folly::kIsSanitizeThread
? folly::detail::AtFork::forkInstrumented(fork)
: fork();
if (pid) {
int status;
auto pid2 = wait(&status);
......
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