[PATCH] D73136: [libFuzzer] Add INFO output when LLVMFuzzerCustomMutator is found.
Max Moroz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 13:00:54 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG15f1d5d14425: [libFuzzer] Add INFO output when LLVMFuzzerCustomMutator is found. (authored by Dor1s).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73136/new/
https://reviews.llvm.org/D73136
Files:
compiler-rt/lib/fuzzer/FuzzerDriver.cpp
compiler-rt/test/fuzzer/fuzzer-custommutator.test
Index: compiler-rt/test/fuzzer/fuzzer-custommutator.test
===================================================================
--- compiler-rt/test/fuzzer/fuzzer-custommutator.test
+++ compiler-rt/test/fuzzer/fuzzer-custommutator.test
@@ -1,11 +1,13 @@
RUN: %cpp_compiler %S/CustomMutatorTest.cpp -o %t-CustomMutatorTest
RUN: not %run %t-CustomMutatorTest 2>&1 | FileCheck %s --check-prefix=LLVMFuzzerCustomMutator
+LLVMFuzzerCustomMutator: INFO: found LLVMFuzzerCustomMutator
LLVMFuzzerCustomMutator: In LLVMFuzzerCustomMutator
LLVMFuzzerCustomMutator: {{.*}} lim: 4096 {{.*}}
LLVMFuzzerCustomMutator: BINGO
# len_control is disabled for custom mutators by default, test that it can be enabled.
RUN: not %run %t-CustomMutatorTest -len_control=100 2>&1 | FileCheck %s --check-prefix=LLVMFuzzerCustomMutatorWithLenControl
+LLVMFuzzerCustomMutatorWithLenControl: INFO: found LLVMFuzzerCustomMutator
LLVMFuzzerCustomMutatorWithLenControl: In LLVMFuzzerCustomMutator
LLVMFuzzerCustomMutatorWithLenControl: {{.*}} lim: {{[1-9][0-9]?}} {{.*}}
LLVMFuzzerCustomMutatorWithLenControl: BINGO
Index: compiler-rt/lib/fuzzer/FuzzerDriver.cpp
===================================================================
--- compiler-rt/lib/fuzzer/FuzzerDriver.cpp
+++ compiler-rt/lib/fuzzer/FuzzerDriver.cpp
@@ -195,8 +195,11 @@
}
// Disable len_control by default, if LLVMFuzzerCustomMutator is used.
- if (EF->LLVMFuzzerCustomMutator)
+ if (EF->LLVMFuzzerCustomMutator) {
Flags.len_control = 0;
+ Printf("INFO: found LLVMFuzzerCustomMutator (%p). "
+ "Disabling -len_control by default.\n", EF->LLVMFuzzerCustomMutator);
+ }
Inputs = new Vector<std::string>;
for (size_t A = 1; A < Args.size(); A++) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73136.239680.patch
Type: text/x-patch
Size: 1728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200122/1f116112/attachment.bin>
More information about the llvm-commits
mailing list