Index: lib/tsan/rtl/tsan_interceptors.cc =================================================================== --- lib/tsan/rtl/tsan_interceptors.cc +++ lib/tsan/rtl/tsan_interceptors.cc @@ -510,7 +510,13 @@ void *p = 0; { SCOPED_INTERCEPTOR_RAW(calloc, size, n); - p = user_alloc(thr, pc, n * size); + if (thr->ignore_interceptors || thr->in_ignored_lib) { + thr->ignore_reads_and_writes++; + p = user_alloc(thr, pc, n * size); + thr->ignore_reads_and_writes--; + } else { + p = user_alloc(thr, pc, n * size); + } if (p) internal_memset(p, 0, n * size); }