[PATCH] D60008: Use binary write mode in WriteToFile function to avoid appended \r characters on Windows
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 29 16:53:57 PDT 2019
vitalybuka added a comment.
Something like that but I would recommend something more generic
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
if (Size < 1000000)
return 0;
// or any other simple hash
Sum = Size;
for (i = 0 to Size )
Sum += data[i]
if (Sum % 100 == 19)
abort();
return 0;
}
rm -rf SOME_UNIQUE_PREFIX*
run with -max_len=2000000 -artifact_prefix=SOME_UNIQUE_PREFIX
it should crash quickly
retry on SOME_UNIQUE_PREFIX*
so if any character in input is altered by Write/Read it should stop being reproducible.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60008/new/
https://reviews.llvm.org/D60008
More information about the llvm-commits
mailing list