[PATCH] D11072: Implement tool to convert bitcode to text.

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 10:12:27 PDT 2015


kcc added a comment.

> - Please don't add unnecessary features. No additional text format if it is not need. No additional library if only one program will use it. Etc.


Karl, 
Within the Rafael's constraints, to which I tend to agree, you may want to back up to my initial proposal:
Implement a fuzzer with a custom mutator:
https://github.com/llvm-mirror/llvm/blob/master/lib/Fuzzer/FuzzerInterface.h
https://github.com/llvm-mirror/llvm/blob/master/lib/Fuzzer/test/UserSuppliedFuzzerTest.cpp

It can all be done simple and in a single file:

1. Read and parse the bit code
2. translate it into some simple binary form in-memory. The simpler the format is the better.
3. let the fuzzer mutate it
4. translate the mutated binary form back to bitcode. If the translation was successful -- run optiimzations. This step is the most important: how many of the mutated units will lead to a valid bitcode?
5. profit


http://reviews.llvm.org/D11072





More information about the llvm-commits mailing list