[llvm] r284169 - [libFuzzer] more detailed message for disabled leak detection
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 13 15:24:11 PDT 2016
Author: kcc
Date: Thu Oct 13 17:24:10 2016
New Revision: 284169
URL: http://llvm.org/viewvc/llvm-project?rev=284169&view=rev
Log:
[libFuzzer] more detailed message for disabled leak detection
Modified:
llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp
Modified: llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp?rev=284169&r1=284168&r2=284169&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp Thu Oct 13 17:24:10 2016
@@ -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
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(con
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;
More information about the llvm-commits
mailing list