[PATCH] D12723: llvm-mc-fuzzer: A fuzzing tool for the MC layer.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 02:56:36 PDT 2015


dsanders marked 9 inline comments as done.
dsanders added a comment.

In http://reviews.llvm.org/D12723#243586, @silvas wrote:

> Nice! I know Russell had been looking at using fuzz-testing to test
>  round-tripping through assembly, which seems like a perfect fit for a
>  libFuzzer-based tool. Russell, is this something that you are still working
>  on? Maybe llvm-mc-fuzzer will grow that functionality some day.
>
> - Sean Silva


I'm keen to get that functionality too. Mips's move instructions will be a bit troublesome here since many distinct opcodes disassemble to 'move $1, $2' but that string only assembles to a single opcode.

One feature that would be helpful from the Fuzzer is the ability for the callback to be able to classify inputs into various bins. For example, "this input is invalid", "this input disassembled but failed to complete the round trip", "this input completed a round trip but the encodings don't match", etc. At the moment, we need to determine this when converting inputs into test cases which seems redundant when the callback already knew what happened.


================
Comment at: tools/llvm-mc-fuzzer/llvm-mc-fuzzer.cpp:105
@@ +104,3 @@
+  LLVMInitializeAllTargetMCs();
+  LLVMInitializeAllDisassemblers();
+
----------------
That worked nicely. Thanks


http://reviews.llvm.org/D12723





More information about the llvm-commits mailing list