[libFuzzer] use sleep() instead of std::this_thread::sleep_for to avoid coverage...
authorKostya Serebryany <kcc@google.com>
Mon, 19 Sep 2016 20:32:34 +0000 (20:32 +0000)
committerKostya Serebryany <kcc@google.com>
Mon, 19 Sep 2016 20:32:34 +0000 (20:32 +0000)
llvm-svn: 281933

llvm/lib/Fuzzer/FuzzerUtil.cpp

index f4c6fa7..f06060b 100644 (file)
@@ -246,7 +246,7 @@ bool ParseDictionaryFile(const std::string &Text, std::vector<Unit> *Units) {
 }
 
 void SleepSeconds(int Seconds) {
-  std::this_thread::sleep_for(std::chrono::seconds(Seconds));
+  sleep(Seconds);  // Use C API to avoid coverage from instrumented libc++.
 }
 
 int GetPid() { return getpid(); }