[LibFuzzer] Try to unbreak the `FuzzerMutate.ShuffleBytes1` unit test.

This test is failing on my Linux box. Just increasing the number of
iterations works around this. The divergence is likely due to
our reliance on `std::shuffle()` which is not guaranteed to have
the same behaviour across platforms.

This is a strong argument for us to implement our own shuffle
function to avoid divergence in behaviour across platforms.

Differential Revision: https://reviews.llvm.org/D45767

llvm-svn: 330390
This commit is contained in:
Dan Liew 2018-04-20 06:46:14 +00:00
parent c8879c989e
commit 25d0c65ff3
1 changed files with 1 additions and 1 deletions

View File

@ -328,7 +328,7 @@ void TestShuffleBytes(Mutator M, int NumIter) {
} }
TEST(FuzzerMutate, ShuffleBytes1) { TEST(FuzzerMutate, ShuffleBytes1) {
TestShuffleBytes(&MutationDispatcher::Mutate_ShuffleBytes, 1 << 16); TestShuffleBytes(&MutationDispatcher::Mutate_ShuffleBytes, 1 << 17);
} }
TEST(FuzzerMutate, ShuffleBytes2) { TEST(FuzzerMutate, ShuffleBytes2) {
TestShuffleBytes(&MutationDispatcher::Mutate, 1 << 20); TestShuffleBytes(&MutationDispatcher::Mutate, 1 << 20);