Index: lib/Fuzzer/FuzzerLoop.cpp =================================================================== --- lib/Fuzzer/FuzzerLoop.cpp +++ lib/Fuzzer/FuzzerLoop.cpp @@ -431,11 +431,11 @@ } // Returns true if there were more mallocs than frees. bool Stop() { return Mallocs > Frees; } - size_t Mallocs; - size_t Frees; + std::atomic Mallocs; + std::atomic Frees; }; -static thread_local MallocFreeTracer AllocTracer; +static MallocFreeTracer AllocTracer; extern "C" { void __sanitizer_malloc_hook(void *ptr, size_t size) { AllocTracer.Mallocs++; }