Index: lib/tsan/rtl/tsan_rtl_mutex.cc =================================================================== --- lib/tsan/rtl/tsan_rtl_mutex.cc +++ lib/tsan/rtl/tsan_rtl_mutex.cc @@ -361,6 +361,7 @@ void Acquire(ThreadState *thr, uptr pc, uptr addr) { DPrintf("#%d: Acquire %zx\n", thr->tid, addr); + CHECK(addr && "addr must not be NULL"); if (thr->ignore_sync) return; SyncVar *s = ctx->metamap.GetIfExistsAndLock(addr, false); @@ -390,6 +391,7 @@ void Release(ThreadState *thr, uptr pc, uptr addr) { DPrintf("#%d: Release %zx\n", thr->tid, addr); + CHECK(addr && "addr must not be NULL"); if (thr->ignore_sync) return; SyncVar *s = ctx->metamap.GetOrCreateAndLock(thr, pc, addr, true); @@ -402,6 +404,7 @@ void ReleaseStore(ThreadState *thr, uptr pc, uptr addr) { DPrintf("#%d: ReleaseStore %zx\n", thr->tid, addr); + CHECK(addr && "addr must not be NULL"); if (thr->ignore_sync) return; SyncVar *s = ctx->metamap.GetOrCreateAndLock(thr, pc, addr, true);