parent
d28c03c03a
commit
7ed5c687ed
|
@ -20,14 +20,13 @@
|
|||
#include "sanitizer_common/sanitizer_stacktrace.h"
|
||||
#include "sanitizer_common/sanitizer_stoptheworld.h"
|
||||
|
||||
#if CAN_SANITIZE_LEAKS
|
||||
namespace __lsan {
|
||||
#if CAN_SANITIZE_LEAKS
|
||||
|
||||
// This mutex is used to prevent races between DoLeakCheck and SuppressObject.
|
||||
BlockingMutex global_mutex(LINKER_INITIALIZED);
|
||||
|
||||
THREADLOCAL int disable_counter;
|
||||
bool DisabledInThisThread() { return disable_counter > 0; }
|
||||
|
||||
Flags lsan_flags;
|
||||
|
||||
|
@ -401,10 +400,16 @@ void LeakReport::PrintSummary() {
|
|||
"SUMMARY: LeakSanitizer: %zu byte(s) leaked in %zu allocation(s).\n\n",
|
||||
bytes, allocations);
|
||||
}
|
||||
|
||||
} // namespace __lsan
|
||||
#endif // CAN_SANITIZE_LEAKS
|
||||
|
||||
bool DisabledInThisThread() {
|
||||
#ifdef CAN_SANITIZE_LEAKS
|
||||
return disable_counter > 0;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
} // namespace __lsan
|
||||
|
||||
using namespace __lsan; // NOLINT
|
||||
|
||||
extern "C" {
|
||||
|
|
Loading…
Reference in New Issue