[llvm-bugs] [Bug 28488] New: llvm-mc crashes with invalid output-asm-variant
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jul 9 12:07:43 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28488
Bug ID: 28488
Summary: llvm-mc crashes with invalid output-asm-variant
Product: libraries
Version: 3.8
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: MC
Assignee: unassignedbugs at nondot.org
Reporter: jvoss+bugs at altsci.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Giving an invalid value to output-asm-variant causes llvm-mc to crash
dereferencing a null pointer.
echo '0xb0 0x0b' | llvm-mc --disassemble -triple=x86_64 --output-asm-variant=2
#0 0x00007ff528254708 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/bin/../lib64/libLLVMSupport.so.3.8+0xcd708)
#1 0x00007ff5282526f6 llvm::sys::RunSignalHandlers()
(/usr/bin/../lib64/libLLVMSupport.so.3.8+0xcb6f6)
#2 0x00007ff5282529cb (/usr/bin/../lib64/libLLVMSupport.so.3.8+0xcb9cb)
#3 0x00007ff5278f9160 (/lib64/libc.so.6+0x33160)
#4 0x000000000040987d _init (/usr/bin/llvm-mc+0x40987d)
#5 0x00007ff5278e6790 __libc_start_main (/lib64/libc.so.6+0x20790)
#6 0x000000000040a429 _init (/usr/bin/llvm-mc+0x40a429)
Stack dump:
0. Program arguments: llvm-mc --disassemble -triple=x86_64
--output-asm-variant=2
Segmentation fault
gdb llvm-mc
(gdb) run --disassemble -triple=x86_64 --output-asm-variant=2
0xb0 0x0b
Program received signal SIGSEGV, Segmentation fault.
0x000000000040987d in main ()
(gdb) bt
#0 0x000000000040987d in main ()
(gdb) disassemble
...
=> 0x000000000040987d <+7005>: mov %al,0x29(%rdx)
(gdb) i r
...
rdx 0x0 0
--
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/20160709/af2f562f/attachment.html>
More information about the llvm-bugs
mailing list