[llvm-bugs] [Bug 30507] New: Disassembly asserts for certain invalid PowerPC instructions
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Sep 23 13:58:41 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30507
Bug ID: 30507
Summary: Disassembly asserts for certain invalid PowerPC
instructions
Product: libraries
Version: 3.9
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: PowerPC
Assignee: unassignedbugs at nondot.org
Reporter: njholcomb at wi.rr.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Calls to LLVMDisasmInstruction() with certain invalid PPC instructions fails
due to assertions instead of returning an error. Below are 4 asserts that were
hit, including example input bytes:
Input: fe 47 c0 0a
llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp:256: void
llvm::PPCInstPrinter::printU1ImmOperand(const llvm::MCInst*, unsigned int,
llvm::raw_ostream&): Assertion `Value <= 1 && "Invalid u1imm argument!"'
failed.
Input: 12 d0 e2 0d
llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp:277: void
llvm::PPCInstPrinter::printU4ImmOperand(const llvm::MCInst*, unsigned int,
llvm::raw_ostream&): Assertion `Value <= 15 && "Invalid u4imm argument!"'
failed.
Input: 7f 1f ce 5d
llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp:210: DecodeStatus
decodeRegisterClass(llvm::MCInst&, uint64_t, const unsigned int (&)[N]) [with
long unsigned int N = 8ul; DecodeStatus = llvm::MCDisassembler::DecodeStatus;
uint64_t = long unsigned int]: Assertion `RegNo < N && "Invalid register
number"' failed.
Input: 7c 96 36 1d
llvm/include/llvm/MC/MCInst.h:75: int64_t llvm::MCOperand::getImm() const:
Assertion `isImm() && "This is not an immediate"' failed.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160923/73afd2ec/attachment.html>
More information about the llvm-bugs
mailing list