diff options
| -rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_rtl.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc index 90e2584cb03..1bbb367b0e2 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc @@ -219,6 +219,10 @@ int Finalize(ThreadState *thr) { Context *ctx = __tsan::ctx; bool failed = false; + // Wait for pending reports. + ctx->report_mtx.Lock(); + ctx->report_mtx.Unlock(); + ThreadFinalize(thr); if (ctx->nreported) { |

