[llvm] r281933 - [libFuzzer] use sleep() instead of std::this_thread::sleep_for to avoid coverage from instrumented libc++
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 19 13:32:34 PDT 2016
Author: kcc
Date: Mon Sep 19 15:32:34 2016
New Revision: 281933
URL: http://llvm.org/viewvc/llvm-project?rev=281933&view=rev
Log:
[libFuzzer] use sleep() instead of std::this_thread::sleep_for to avoid coverage from instrumented libc++
Modified:
llvm/trunk/lib/Fuzzer/FuzzerUtil.cpp
Modified: llvm/trunk/lib/Fuzzer/FuzzerUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerUtil.cpp?rev=281933&r1=281932&r2=281933&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerUtil.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerUtil.cpp Mon Sep 19 15:32:34 2016
@@ -246,7 +246,7 @@ bool ParseDictionaryFile(const std::stri
}
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(); }
More information about the llvm-commits
mailing list