diff options
author | Kostya Serebryany <kcc@google.com> | 2016-10-13 22:24:10 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2016-10-13 22:24:10 +0000 |
commit | 0381374f96363344fc1a0efb3b42e809d0d065bf (patch) | |
tree | eac75e852aba40ace7b19cf9c75f0073f59c6278 | |
parent | 24a01c341e5bcbe9389c3a482b08a58063b06115 (diff) | |
download | bcm5719-llvm-0381374f96363344fc1a0efb3b42e809d0d065bf.tar.gz bcm5719-llvm-0381374f96363344fc1a0efb3b42e809d0d065bf.zip |
[libFuzzer] more detailed message for disabled leak detection
llvm-svn: 284169
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerLoop.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerLoop.cpp b/llvm/lib/Fuzzer/FuzzerLoop.cpp index 37db6ee09e5..32e5536c42f 100644 --- a/llvm/lib/Fuzzer/FuzzerLoop.cpp +++ b/llvm/lib/Fuzzer/FuzzerLoop.cpp @@ -119,7 +119,7 @@ struct MallocFreeTracer { Frees = 0; } // Returns true if there were more mallocs than frees. - bool Stop() { + bool Stop() { if (TraceLevel) Printf("MallocFreeTracer: STOP %zd %zd (%s)\n", Mallocs.load(), Frees.load(), Mallocs == Frees ? "same" : "DIFFERENT"); @@ -147,7 +147,7 @@ void MallocHook(const volatile void *ptr, size_t size) { void FreeHook(const volatile void *ptr) { size_t N = AllocTracer.Frees++; if (int TraceLevel = AllocTracer.TraceLevel) { - Printf("FREE[%zd] %p %zd\n", N, ptr); + Printf("FREE[%zd] %p\n", N, ptr); if (TraceLevel >= 2 && EF) EF->__sanitizer_print_stack_trace(); } @@ -667,6 +667,8 @@ void Fuzzer::TryDetectingAMemoryLeak(const uint8_t *Data, size_t Size, Printf("INFO: libFuzzer disabled leak detection after every mutation.\n" " Most likely the target function accumulates allocated\n" " memory in a global state w/o actually leaking it.\n" + " You may try running this binary with -trace_malloc=[12]" + " to get a trace of mallocs and frees.\n" " If LeakSanitizer is enabled in this process it will still\n" " run on the process shutdown.\n"); return; |