[lib/Fuzzer] make the fuzzing timeout 1200 seconds by default (was: infinity)
authorKostya Serebryany <kcc@google.com>
Tue, 26 May 2015 20:57:47 +0000 (20:57 +0000)
committerKostya Serebryany <kcc@google.com>
Tue, 26 May 2015 20:57:47 +0000 (20:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238251 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LibFuzzer.rst
lib/Fuzzer/FuzzerFlags.def
lib/Fuzzer/FuzzerLoop.cpp

index 412087ac726957327d162f8442ebb6db05d80707..47bdfd3a27d027203fb63b644b403ddc49b6eeb3 100644 (file)
@@ -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.
index 8157714b65ef8cf8336d1045f223b21f8b81c04b..742f672e2012f25e2f11a2a4ecee7aa6587923ff 100644 (file)
@@ -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.")
index 1b6a82fe4a8b00090e5eb31e648cdd17d1c88fc7..4c8b247a72ed6cde7c8d234b6ba2edfc0fc4af72 100644 (file)
@@ -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-");