[PATCH] D21218: [LibFuzzer] Avoid using std::random_swap() due to platform differences and implement our own version.

Dan Liew via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 17:26:31 PDT 2016

delcypher added a comment.

In http://reviews.llvm.org/D21218#456978, @kcc wrote:

> In http://reviews.llvm.org/D21218#456562, @delcypher wrote:
> > In http://reviews.llvm.org/D21218#455412, @kcc wrote:
> >
> > > What problem are you trying to fix and do you really need to fix it?
> >
> >
> > The problem I'm trying to fix is inconsistent mutation behavior between OSX and Linux. Having inconsistent behavior is undesirable because
> >
> > - It makes debugging issues on OSX harder because it prevents me from using how LibFuzzer behaves on Linux as my point of reference.
> > - It makes tests flakey.
> Tests that do random mutations will behave this way.
>  They are not flaky in usual meaning, i.e. running the same binary 10000000 times will give the same result.
>  But running on a different OS, or with a different STL may produce different result here and it should be fine.

I disagree with your choice here. I would prefer for consistent behavior where it is possible, however:

- I have run out time to do any more major porting work for LibFuzzer.
- LibFuzzer is your project so you have the final say here.

So would you accept a patch that just increases the number iterations we do of the mutator to fix the test? If yes do you want it to be the minimum number of iterations required or something more readable like `(1 << 20)`?


More information about the llvm-commits mailing list