[PATCH] D14443: [tsan] Turn lit test deadlocks into failures (OS X)

Ismail Pazarbasi via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 09:30:30 PST 2015


ismailp added a comment.

I've go fork tests working by disabling interceptors for it. It's fused with another commit in my history, so I can't be precise. But...

  --- a/lib/tsan/rtl/tsan_interceptors.cc
  +++ b/lib/tsan/rtl/tsan_interceptors.cc
  @@ -2112,7 +2307,15 @@ TSAN_INTERCEPTOR(int, fork, int fake) {
       return REAL(fork)(fake);
     SCOPED_INTERCEPTOR_RAW(fork, fake);
     ForkBefore(thr, pc);
  +#if !SANITIZER_MAC
     int pid = REAL(fork)(fake);
  +#else
  +  int pid = -1;
  +  {
  +    ScopedIgnoreInterceptors ignore;
  +    pid = REAL(fork)(fake);
  +  }
  +#endif
     if (pid == 0) {
       // child
       ForkChildAfter(thr, pc);

may fix the problem.


http://reviews.llvm.org/D14443





More information about the llvm-commits mailing list