[PATCH] D27234: [libFuzzer] Diff 4 - Split FuzzerUtil implementation for Posix and Windows.

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 16:25:35 PST 2016


kcc accepted this revision.
kcc added a comment.

LGTM (I did not read the widows code)
As for every other patch, please ensure check-fuzzer still work on Linux.



================
Comment at: lib/Fuzzer/FuzzerUtil.cpp:199
+int NumberOfCpuCores() {
+  unsigned N = std::thread::hardware_concurrency();
+  if (!N) {
----------------
zturner wrote:
> Kostya, can you confirm that the call to `std::thread::hardware_concurrency()` here is ok?  The call to `sleep` earlier has a comment explicitly stating that stl can't be used.  Is the same thing going to be true here?
Yep, should be fine. 
We should only avoid heavy STL around the calls to the user callback.
This one is happening at init time. 


Repository:
  rL LLVM

https://reviews.llvm.org/D27234





More information about the llvm-commits mailing list