This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Fixed Assertion`Kind == Immediate && "Invalid type access!"' failed.
ClosedPublic

Authored by apazos on Aug 15 2018, 11:45 AM.

Details

Summary

Missing check for isImm() in some Immediate classes.

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

Diff Detail

Repository
rL LLVM

Event Timeline

apazos created this revision.Aug 15 2018, 11:45 AM
apazos retitled this revision from [PGO] Fixed assertion due to mismatched memcpy size type. to [RISCV] Fixed Assertion`Kind == Immediate && "Invalid type access!"' failed..Aug 15 2018, 11:46 AM
hiraditya accepted this revision.Aug 15 2018, 12:35 PM
hiraditya added a subscriber: hiraditya.

LGTM.

This revision is now accepted and ready to land.Aug 15 2018, 12:35 PM
apazos updated this revision to Diff 160891.Aug 15 2018, 12:37 PM

Updated one more Immediate class.
We should probably update them all, the fuzzer keeps breaking. Let me know.

apazos updated this revision to Diff 160927.Aug 15 2018, 3:22 PM

One more Immediate class check failure.

apazos updated this revision to Diff 161099.Aug 16 2018, 1:21 PM

Added the last immediate fix, it looks like the fuzzer found them all.

Updated one more Immediate class.
We should probably update them all, the fuzzer keeps breaking. Let me know.

I think it's okay to merge this one, and if we find more then we can put that in subsequent patches.

asb added a reviewer: asb.Aug 23 2018, 5:14 AM
asb accepted this revision.Aug 23 2018, 5:17 AM

Looks good to me, thanks. Great to see the fuzzer uncovering bugs like this.

This revision was automatically updated to reflect the committed changes.