[llvm] r269450 - [libFuzzer] print the file name before executing the input so that if there is a crash we know which files has caused it
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Fri May 13 11:10:33 PDT 2016
Author: kcc
Date: Fri May 13 13:10:33 2016
New Revision: 269450
URL: http://llvm.org/viewvc/llvm-project?rev=269450&view=rev
Log:
[libFuzzer] print the file name before executing the input so that if there is a crash we know which files has caused it
Modified:
llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp
llvm/trunk/lib/Fuzzer/test/fuzzer.test
Modified: llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp?rev=269450&r1=269449&r2=269450&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp Fri May 13 13:10:33 2016
@@ -367,11 +367,12 @@ static int FuzzerDriver(const std::vecto
Inputs->size(), Runs);
for (auto &Path : *Inputs) {
auto StartTime = system_clock::now();
+ Printf("%s ... ", Path.c_str());
for (int Iter = 0; Iter < Runs; Iter++)
RunOneTest(&F, Path.c_str());
auto StopTime = system_clock::now();
auto MS = duration_cast<milliseconds>(StopTime - StartTime).count();
- Printf("%s: %zd ms\n", Path.c_str(), (long)MS);
+ Printf("%zd ms\n", (long)MS);
}
F.PrintFinalStats();
exit(0);
Modified: llvm/trunk/lib/Fuzzer/test/fuzzer.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/fuzzer.test?rev=269450&r1=269449&r2=269450&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/fuzzer.test (original)
+++ llvm/trunk/lib/Fuzzer/test/fuzzer.test Fri May 13 13:10:33 2016
@@ -57,8 +57,8 @@ RUN: echo bbb > %tmp/SINGLE_INPUTS/bbb
RUN: LLVMFuzzer-SimpleTest %tmp/SINGLE_INPUTS/aaa %tmp/SINGLE_INPUTS/bbb 2>&1 | FileCheck %s --check-prefix=SINGLE_INPUTS
RUN: rm -rf %tmp/SINGLE_INPUTS
SINGLE_INPUTS: LLVMFuzzer-SimpleTest: Running 2 inputs 1 time(s) each.
-SINGLE_INPUTS: aaa:
-SINGLE_INPUTS: bbb:
+SINGLE_INPUTS: aaa ...
+SINGLE_INPUTS: bbb ...
RUN: rm -rf %t/SUB1
RUN: mkdir -p %t/SUB1/SUB2/SUB3
More information about the llvm-commits
mailing list