[llvm] r227357 - [fuzzer] instructions for building/running clang-format-fuzzer

Kostya Serebryany kcc at google.com
Wed Jan 28 11:51:58 PST 2015


Author: kcc
Date: Wed Jan 28 13:51:58 2015
New Revision: 227357

URL: http://llvm.org/viewvc/llvm-project?rev=227357&view=rev
Log:
[fuzzer] instructions for building/running clang-format-fuzzer

Modified:
    llvm/trunk/lib/Fuzzer/README.txt

Modified: llvm/trunk/lib/Fuzzer/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/README.txt?rev=227357&r1=227356&r2=227357&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/README.txt (original)
+++ llvm/trunk/lib/Fuzzer/README.txt Wed Jan 28 13:51:58 2015
@@ -45,7 +45,15 @@ to be fixed later.
 
 Examples of usage in LLVM:
   * clang-format-fuzzer. The inputs are random pieces of C++-like text.
-  * TODO: add more
+  * Build (make sure to use fresh clang as the host compiler):
+    cmake -GNinja  -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
+    -DLLVM_USE_SANITIZER=Address -DLLVM_USE_SANITIZE_COVERAGE=YES \
+    /path/to/llvm -DCMAKE_BUILD_TYPE=Release
+    ninja clang-format-fuzzer
+  * Optionally build other kinds of binaries (asan+Debug, msan, ubsan, etc)
+  * TODO: commit the pre-fuzzed corpus to svn (?).
+  * Run:
+      clang-format-fuzzer CORPUS_DIR
 
 Toy example (see SimpleTest.cpp):
 a simple function that does something interesting if it receives bytes "Hi!".





More information about the llvm-commits mailing list