[PATCH] D21194: Enable libFuzzer's afl_driver to append stderr to a file.

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 12:03:51 PDT 2016


kcc added a comment.

Please upload the patches with context (use the 'arc' command line tool).


================
Comment at: lib/Fuzzer/afl/afl_driver.cpp:64
@@ +63,3 @@
+// If the user asks us to duplicate stderr, then do it.
+void duplicate_stderr() {
+  char* stderr_duplicate_filename =
----------------
static void maybe_duplicate_stderr() {

================
Comment at: lib/Fuzzer/test/afl-driver.test:1
@@ +1,2 @@
+RUN: clang++ %S/../afl/afl_driver.cpp %S/AFLDriverTest.cpp -o %T/test-afl-driver
+
----------------
I afraid it's not that simple. 
You can not expect clang++ to be in PATH, so you actually need to have a cmake
rule to build this binary

================
Comment at: lib/Fuzzer/test/afl-driver.test:8
@@ +7,3 @@
+; Test that specifying an invalid file causes a crash.
+RUN: AFL_DRIVER_STDERR_DUPLICATE_FILENAME="%T" ~/llvm/build/bin/not --crash %T/test-afl-driver
+
----------------
and of course you can not expect ~/llvm to exist


http://reviews.llvm.org/D21194





More information about the llvm-commits mailing list