[PATCH] D27433: [libFuzzer] Diff 16 - Fix bug in detecting timeouts when input string is empty.
Kostya Serebryany via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 18:24:01 PST 2016
kcc accepted this revision.
kcc added a comment.
This revision is now accepted and ready to land.
LGTM with a nit
================
Comment at: lib/Fuzzer/test/TimeoutEmptyTest.cpp:9
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
+ while (!Size)
+ ;
----------------
This is fragile and may be optimized away.
Instead do this:
static volatile int zero = 0;
if (!size)
while(!zero)
;
Repository:
rL LLVM
https://reviews.llvm.org/D27433
More information about the llvm-commits
mailing list