[llvm-bugs] [Bug 24683] New: echo '""' | clang -s -xassembler - hits "Invalid index!" assertion
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 2 16:45:39 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24683
Bug ID: 24683
Summary: echo '""' | clang -s -xassembler - hits "Invalid
index!" assertion
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: MC
Assignee: unassignedbugs at nondot.org
Reporter: anton at samba.org
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Looks like an issue in AsmParser with an empty string in double quotes:
# echo '""' | clang -s -xassembler -
clang-3.8: /home/anton/llvm/include/llvm/ADT/StringRef.h:198: char
llvm::StringRef::operator[](size_t) const: Assertion `Index < Length &&
"Invalid index!"' failed.
0 clang-3.8 0x0000000012095d40 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
+ 80
1 clang-3.8 0x0000000012096134
2 clang-3.8 0x00000000120942d0 llvm::sys::RunSignalHandlers() + 220
3 clang-3.8 0x00000000120949a4
4 0x00003fffa2620478 __kernel_sigtramp_rt64 + 0
5 libc.so.6 0x00003fffa207ef94 gsignal + 116
6 libc.so.6 0x00003fffa208189c abort + 748
7 libc.so.6 0x00003fffa2074964
8 libc.so.6 0x00003fffa2074a54 __assert_fail + 100
9 clang-3.8 0x0000000010e45304
10 clang-3.8 0x0000000011d8f23c
11 clang-3.8 0x0000000011d8ad94
12 clang-3.8 0x0000000010e63b88
13 clang-3.8 0x0000000010e643c0 cc1as_main(llvm::ArrayRef<char const*>, char
const*, void*) + 1136
14 clang-3.8 0x0000000010e432a0
15 clang-3.8 0x0000000010e43910 main + 1292
16 libc.so.6 0x00003fffa2063500
17 libc.so.6 0x00003fffa2063734 __libc_start_main + 180
Stack dump:
0. Program arguments: /home/anton/llvm.install/bin/clang-3.8 -cc1as -triple
powerpc64le-unknown-linux-gnu -filetype obj -main-file-name x.s -target-cpu
ppc64le -fdebug-compilation-dir /tmp/linux.junk -dwarf-debug-producer clang
version 3.8.0 (git://github.com/llvm-mirror/clang.git
fbd2901a30d987614df74465e21879e268f2d3ea)
(git://github.com/llvm-mirror/llvm.git
6ebb592b01d15d4a832d67c729b822cfbd6d6ccd) -mrelocation-model static -o
/tmp/x-652efe.o x.s
1. Program arguments: -triple powerpc64le-unknown-linux-gnu -filetype obj
-main-file-name x.s -target-cpu ppc64le -fdebug-compilation-dir /tmp/linux.junk
-dwarf-debug-producer clang version 3.8.0
(git://github.com/llvm-mirror/clang.git
fbd2901a30d987614df74465e21879e268f2d3ea)
(git://github.com/llvm-mirror/llvm.git
6ebb592b01d15d4a832d67c729b822cfbd6d6ccd) -mrelocation-model static -o
/tmp/x-652efe.o x.s
0 clang-3.8 0x0000000012095d40 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
+ 80
1 clang-3.8 0x0000000012096134
2 clang-3.8 0x00000000120942d0 llvm::sys::RunSignalHandlers() + 220
3 clang-3.8 0x00000000120949a4
4 0x00003fffa2620478 __kernel_sigtramp_rt64 + 0
5 libc.so.6 0x00003fffa207ef94 gsignal + 116
6 libc.so.6 0x00003fffa208189c abort + 748
7 libc.so.6 0x00003fffa2074964
8 libc.so.6 0x00003fffa2074a54 __assert_fail + 100
9 clang-3.8 0x0000000010e45304
10 clang-3.8 0x0000000011d8f23c
11 clang-3.8 0x0000000011d8ad94
12 clang-3.8 0x0000000010e63b88
13 clang-3.8 0x0000000010e643c0 cc1as_main(llvm::ArrayRef<char const*>, char
const*, void*) + 1136
14 clang-3.8 0x0000000010e432a0
15 clang-3.8 0x0000000010e43910 main + 1292
16 libc.so.6 0x00003fffa2063500
17 libc.so.6 0x00003fffa2063734 __libc_start_main + 180
clang-3.8: error: unable to execute command: Aborted
clang-3.8: error: clang integrated assembler command failed due to signal (use
-v to see invocation)
clang version 3.8.0 (git://github.com/llvm-mirror/clang.git
fbd2901a30d987614df74465e21879e268f2d3ea)
(git://github.com/llvm-mirror/llvm.git
6ebb592b01d15d4a832d67c729b822cfbd6d6ccd)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/anton/llvm.install/bin
clang-3.8: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.8: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.
--
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/20150902/f3351eca/attachment.html>
More information about the llvm-bugs
mailing list