[PATCH] D20409: [LibFuzzer] Fix NumberOfCpuCores() for Mac OSX

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 16:15:44 PDT 2016


kcc requested changes to this revision.
kcc added a comment.
This revision now requires changes to proceed.

LGTM


================
Comment at: lib/Fuzzer/FuzzerUtil.cpp:140
@@ -121,1 +139,3 @@
+  }
+  assert(N > 0 && "Number of cpu cores must be > 0");
   return N;
----------------
delcypher wrote:
> kcc wrote:
> > with the default N = 1 you can just remove this. 
> If the command returns the string "0" then N will still get set to 0 regardless of the default which means the assert is still needed.
But then you probably don't want the assert, just return 1.


http://reviews.llvm.org/D20409





More information about the llvm-commits mailing list