<html>
<head>
<base href="https://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 --- - echo '""' | clang -s -xassembler - hits "Invalid index!" assertion"
href="https://llvm.org/bugs/show_bug.cgi?id=24683">24683</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>echo '""' | clang -s -xassembler - hits "Invalid index!" assertion
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>MC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>anton@samba.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> 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.</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>