This is an archive of the discontinued LLVM Phabricator instance.

WIP Implemented asm proto fuzzer with a sample grammar
AbandonedPublic

Authored by jocewei on Jul 18 2018, 4:44 PM.

Details

Reviewers
apazos
mgrang
asb
Summary

upstream

Diff Detail

Event Timeline

jocewei created this revision.Jul 18 2018, 4:44 PM
jocewei retitled this revision from Implemented asm proto fuzzer with a sample grammar to WIP Implemented asm proto fuzzer with a sample grammar.Jul 18 2018, 4:52 PM
jocewei added reviewers: apazos, mgrang, asb.
asb added a comment.Jul 19 2018, 7:34 AM

Hi Jocelyn and welcome to the LLVM community. I'm really excited about this approach to testing the assembler. I've just got a few comments for now.

If I understand correctly, with the approach of verifying the GNU objdump produces the exact same ASM string, you're committing yourself to handling all of the aliases manually in proto_to_asm.cpp (as you do with neg) or else using -riscv-no-aliases and constraining the fuzzer to never generate aliased instructions. If approaching this simply as randomised test generation I'd be tempted to use objdump to check that llvm-mc and gas produce the same encoded value for the randomly generated instruction. Do you think there's any scope for supporting such a mode? With the current strategy, presumably you'd be post-processing the objdumped .s so that you don't get a test failure for e.g. addi x1, x2, 0xa input vs addi x1, x2, 10 output?

I'm new to this infrastructure so apologies if I've misunderstood how things work and thanks for working on this issue.

jocewei edited the summary of this revision. (Show Details)Jul 24 2018, 1:06 PM
jocewei updated this revision to Diff 157127.Jul 24 2018, 2:09 PM

Fixed hardcoded paths in cmake/modules/ProtobufMutatorMC.cmake, cleaned up naming in asm_proto.proto, updated README, and reverted changes in cmake/modules/ProtobufMutator.cmake

jocewei updated this revision to Diff 158649.Aug 1 2018, 3:18 PM
This comment was removed by jocewei.
jocewei updated this revision to Diff 158652.Aug 1 2018, 3:33 PM
This comment was removed by jocewei.
jocewei updated this revision to Diff 159029.Aug 3 2018, 9:46 AM
This comment was removed by jocewei.
jocewei updated this revision to Diff 159030.Aug 3 2018, 9:52 AM

Reverting

bcain added a subscriber: bcain.Aug 16 2018, 12:37 PM
jocewei updated this revision to Diff 161133.Aug 16 2018, 3:30 PM
jocewei edited the summary of this revision. (Show Details)

Patch got messed up, fixing it now.

This comment was removed by jocewei.
This comment was removed by jocewei.
jocewei abandoned this revision.Aug 24 2018, 2:59 PM

Abandoning revision because tool has been moved to llvm/tools from clang/tools, as of this patch: https://reviews.llvm.org/D51144