This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Fix decoding of invalid instruction with C extension enabled.
ClosedPublic

Authored by apazos on Sep 7 2018, 2:11 PM.

Details

Summary

The illegal instruction 0x00 0x00 is being wrongly decoded as c.addi4spn with 0 immediate.

The invalid instruction 0x01 0x61 is being wrongly decoded as c.addi16sp with 0 immediate.

This bug was uncovered by a LLVM MC Disassembler Protocol Buffer Fuzzer
for the RISC-V assembly language.

Diff Detail

Repository
rL LLVM

Event Timeline

apazos created this revision.Sep 7 2018, 2:11 PM
apazos updated this revision to Diff 164524.Sep 7 2018, 3:04 PM
apazos retitled this revision from [RISCV] Fix decoding of illegal instruction to [RISCV] Fix decoding of invalid instruction with C extension enabled..
apazos edited the summary of this revision. (Show Details)
asb accepted this revision.Sep 13 2018, 7:06 AM

Thanks, looks good to me.

This revision is now accepted and ready to land.Sep 13 2018, 7:06 AM
This revision was automatically updated to reflect the committed changes.