Instead of crashing in printFRMArg, decode and warn about invalid instruction.
This bug was uncovered by a LLVM MC Disassembler Protocol Buffer Fuzzer for the RISC-V assembly language.
Paths
| Differential D51705
[RISCV] Fix crash in decoding instruction with unknown floating point rounding mode ClosedPublic Authored by apazos on Sep 5 2018, 3:43 PM.
Details Summary Instead of crashing in printFRMArg, decode and warn about invalid instruction. This bug was uncovered by a LLVM MC Disassembler Protocol Buffer Fuzzer for the RISC-V assembly language.
Diff Detail Event TimelineHerald added subscribers: jocewei, PkmX, rkruppe and 14 others. · View Herald TranscriptSep 5 2018, 3:43 PM Comment Actions Looks good to me, thanks. Just one tiny comment inline. As this is a disassembler-only test and only makes sense as a disassembler test it might be worth putting in test/MC/Disassembler/RISCV, and perhaps choosing a more descriptive name. e.g. invalid-fp-founding-mode.txt.
This revision is now accepted and ready to land.Sep 6 2018, 7:24 AM Closed by commit rL341691: [RISCV] Fix crash in decoding instruction with unknown floating point rounding… (authored by apazos). · Explain WhySep 7 2018, 11:46 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 164117 lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
lib/Target/RISCV/RISCVInstrInfoF.td
test/MC/RISCV/fuzzer-invalid.txt
|
Can't this line be deleted as the case is fully covered.