<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Mips's disassembler crash on several inputs"
href="http://llvm.org/bugs/show_bug.cgi?id=20993">20993</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Mips's disassembler crash on several inputs
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>junkoi2004@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Some input crash Mips's disassembler
==========
$ echo "0xcc,0x00,0x00,0x00" | ./Release+Asserts/bin/llvm-mc -disassemble
-arch=mips
.text
pref Assertion failed: (begin() + idx < end()), function operator[],
file /Users/jun/projects/llvm/mips-5.git/include/llvm/ADT/SmallVector.h, line
142.
0 llvm-mc 0x000000010b201838
llvm::sys::PrintStackTrace(__sFILE*) + 40
1 llvm-mc 0x000000010b201d4b SignalHandler(int) + 635
2 libsystem_platform.dylib 0x00007fff883b45aa _sigtramp + 26
3 libsystem_platform.dylib 000000000000000000 _sigtramp + 2009381488
4 llvm-mc 0x000000010b201ab6 abort + 22
5 llvm-mc 0x000000010b201a91 __assert_rtn + 81
6 llvm-mc 0x000000010b1ac4a3
llvm::MipsInstPrinter::printInstruction(llvm::MCInst const*,
llvm::raw_ostream&) + 4179
7 llvm-mc 0x000000010b1ae96e
llvm::MipsInstPrinter::printInst(llvm::MCInst const*, llvm::raw_ostream&,
llvm::StringRef) + 478
8 llvm-mc 0x000000010b1c127e (anonymous
namespace)::MCAsmStreamer::EmitInstruction(llvm::MCInst const&,
llvm::MCSubtargetInfo const&) + 2718
9 llvm-mc 0x000000010b14bf43
llvm::Disassembler::disassemble(llvm::Target const&,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&, llvm::MCSubtargetInfo&, llvm::MCStreamer&,
llvm::MemoryBuffer&, llvm::SourceMgr&, llvm::raw_ostream&) + 1955
10 llvm-mc 0x000000010b14e8cd main + 8189
11 libdyld.dylib 0x00007fff859a55fd start + 1
12 libdyld.dylib 0x0000000000000003 start + 2053483015
Stack dump:
0. Program arguments: ./Release+Asserts/bin/llvm-mc -disassemble -arch=mips
[1] 96776 done echo "0xcc,0x00,0x00,0x00" |
96777 illegal hardware instruction ./Release+Asserts/bin/llvm-mc
-disassemble -arch=mips
=============
$ echo "0x00,0x00,0x00,0xcc" | ./Release+Asserts/bin/llvm-mc -disassemble
-arch=mipsel -show-encoding
.text
llvm-mc: MipsMCCodeEmitter.cpp:588: unsigned int
llvm::MipsMCCodeEmitter::getMemEncoding(const llvm::MCInst&, unsigned int,
llvm::SmallVectorImpl<llvm::MCFixup>&, const llvm::MCSubtargetInfo&) const:
Assertion `MI.getOperand(OpNo).isReg()' failed.
0 llvm-mc 0x00000000004be9b2
1 llvm-mc 0x00000000004be571
2 libpthread.so.0 0x00007f8862a33340
3 libc.so.6 0x00007f8861a46bb9 gsignal + 57
4 libc.so.6 0x00007f8861a49fc8 abort + 328
5 libc.so.6 0x00007f8861a3fa76
6 libc.so.6 0x00007f8861a3fb22
7 llvm-mc 0x00000000004546f2
8 llvm-mc 0x0000000000458897
9 llvm-mc 0x0000000000459eb2
10 llvm-mc 0x0000000000470305
11 llvm-mc 0x0000000000470e08
12 llvm-mc 0x000000000040f974
13 llvm-mc 0x000000000040d13b
14 libc.so.6 0x00007f8861a31ec5 __libc_start_main + 245
15 llvm-mc 0x000000000040f0bd
Stack dump:
0. Program arguments: ./Release+Asserts/bin/llvm-mc --disassemble
-arch=mipsel -show-encoding
Aborted (core dumped)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>