From 25d0c65ff301609c2ef6212962e68bdc81098e17 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Fri, 20 Apr 2018 06:46:14 +0000 Subject: [PATCH] [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 --- compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp b/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp index 97ec3b4bb6af..3f57a5d60c28 100644 --- a/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp +++ b/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp @@ -328,7 +328,7 @@ void TestShuffleBytes(Mutator M, int NumIter) { } TEST(FuzzerMutate, ShuffleBytes1) { - TestShuffleBytes(&MutationDispatcher::Mutate_ShuffleBytes, 1 << 16); + TestShuffleBytes(&MutationDispatcher::Mutate_ShuffleBytes, 1 << 17); } TEST(FuzzerMutate, ShuffleBytes2) { TestShuffleBytes(&MutationDispatcher::Mutate, 1 << 20);