[llvm] r253761 - [libFuzzer] don't crash when reporting a leak in test_single_input mode

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 19:46:44 PST 2015


Author: kcc
Date: Fri Nov 20 21:46:43 2015
New Revision: 253761

URL: http://llvm.org/viewvc/llvm-project?rev=253761&view=rev
Log:
[libFuzzer] don't crash when reporting a leak in test_single_input mode

Modified:
    llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp

Modified: llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp?rev=253761&r1=253760&r2=253761&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp Fri Nov 20 21:46:43 2015
@@ -273,8 +273,10 @@ int FuzzerDriver(const std::vector<std::
   if (Flags.timeout > 0)
     SetTimer(Flags.timeout / 2 + 1);
 
-  if (Flags.test_single_input)
-    return RunOneTest(&F, Flags.test_single_input);
+  if (Flags.test_single_input) {
+    RunOneTest(&F, Flags.test_single_input);
+    exit(0);
+  }
 
   if (Flags.merge) {
     F.Merge(*Inputs);




More information about the llvm-commits mailing list