[PATCH] D45693: [LibFuzzer] Tweak `MutationDispatcher::Mutate_CopyPart` mutation.

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 20 08:21:46 PDT 2018


kcc accepted this revision.
kcc added a comment.

LGTM with a nit.



================
Comment at: lib/fuzzer/tests/FuzzerUnittest.cpp:394
+  size_t MaxSize = sizeof(Data);
+  for (unsigned int count = 0; count < (1 << 18); ++count) {
+    size_t NewSize = MD->Mutate_CopyPart(Data, MaxSize, MaxSize);
----------------
Why unsigned int? 

This code uses 'int' or 'size_t', depending on the context. 
size_t for something that is a size, 'int' for just iterations. 

unsigned int is longer to spell and is inconsistent. 


https://reviews.llvm.org/D45693





More information about the llvm-commits mailing list