[llvm] r238251 - [lib/Fuzzer] make the fuzzing timeout 1200 seconds by default (was: infinity)

Kostya Serebryany kcc at google.com
Tue May 26 13:57:48 PDT 2015


Author: kcc
Date: Tue May 26 15:57:47 2015
New Revision: 238251

URL: http://llvm.org/viewvc/llvm-project?rev=238251&view=rev
Log:
[lib/Fuzzer] make the fuzzing timeout 1200 seconds by default (was: infinity)

Modified:
    llvm/trunk/docs/LibFuzzer.rst
    llvm/trunk/lib/Fuzzer/FuzzerFlags.def
    llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp

Modified: llvm/trunk/docs/LibFuzzer.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LibFuzzer.rst?rev=238251&r1=238250&r2=238251&view=diff
==============================================================================
--- llvm/trunk/docs/LibFuzzer.rst (original)
+++ llvm/trunk/docs/LibFuzzer.rst Tue May 26 15:57:47 2015
@@ -59,7 +59,7 @@ The most important flags are::
   max_len                            	64	Maximum length of the test input.
   cross_over                         	1	If 1, cross over inputs.
   mutate_depth                       	5	Apply this number of consecutive mutations to each input.
-  timeout                            	-1	Timeout in seconds (if positive). If one unit runs more than this number of seconds the process will abort.
+  timeout                            	1200	Timeout in seconds (if positive). If one unit runs more than this number of seconds the process will abort.
   help                               	0	Print help.
   save_minimized_corpus              	0	If 1, the minimized corpus is saved into the first input directory
   jobs                               	0	Number of jobs to run. If jobs >= 1 we spawn this number of jobs in separate worker processes with stdout/stderr redirected to fuzz-JOB.log.

Modified: llvm/trunk/lib/Fuzzer/FuzzerFlags.def
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerFlags.def?rev=238251&r1=238250&r2=238251&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerFlags.def (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerFlags.def Tue May 26 15:57:47 2015
@@ -28,7 +28,7 @@ FUZZER_FLAG_INT(
 FUZZER_FLAG_INT(exit_on_first, 0,
             "If 1, exit after the first new interesting input is found.")
 FUZZER_FLAG_INT(
-    timeout, -1,
+    timeout, 1200,
     "Timeout in seconds (if positive). "
     "If one unit runs more than this number of seconds the process will abort.")
 FUZZER_FLAG_INT(help, 0, "Print help.")

Modified: llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp?rev=238251&r1=238250&r2=238251&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp Tue May 26 15:57:47 2015
@@ -66,6 +66,8 @@ void Fuzzer::AlarmCallback() {
     Printf("AlarmCallback %zd\n", Seconds);
   if (Seconds >= (size_t)Options.UnitTimeoutSec) {
     Printf("ALARM: working on the last Unit for %zd seconds\n", Seconds);
+    Printf("       and the timeout value is %d (use -timeout=N to change)\n",
+           Options.UnitTimeoutSec);
     Print(CurrentUnit, "\n");
     PrintUnitInASCIIOrTokens(CurrentUnit, "\n");
     WriteToCrash(CurrentUnit, "timeout-");





More information about the llvm-commits mailing list