[libFuzzer] trying to fix at-exit hang
authorKostya Serebryany <kcc@google.com>
Sat, 3 Oct 2015 07:02:05 +0000 (07:02 +0000)
committerKostya Serebryany <kcc@google.com>
Sat, 3 Oct 2015 07:02:05 +0000 (07:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249231 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Fuzzer/FuzzerDriver.cpp

index b267a9b..fe14cbf 100644 (file)
@@ -318,7 +318,7 @@ int FuzzerDriver(const std::vector<std::string> &Args,
     Printf("Done %d runs in %zd second(s)\n", F.getTotalNumberOfRuns(),
            F.secondsSinceProcessStartUp());
 
-  return 0;
+  exit(0);  // Don't let F destroy itself.
 }
 
 }  // namespace fuzzer