[PATCH] D45693: [LibFuzzer] Tweak `MutationDispatcher::Mutate_CopyPart` mutation.
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 23 03:42:00 PDT 2018
delcypher added inline comments.
================
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);
----------------
kcc wrote:
> 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.
The only reason was I was worried about someone writing the loop bound to be so large that it became negative when using `int`. This isn't is a particularly good reason because there are a plethora of other ways that someone can still screw up using `unsigned int` so I'll switch to using `int` and then commit.
https://reviews.llvm.org/D45693
More information about the llvm-commits
mailing list