<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - clang's assembler crashes when given a bogus scalar multiple in lea"
href="https://bugs.llvm.org/show_bug.cgi?id=33661">33661</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang's assembler crashes when given a bogus scalar multiple in lea
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>4.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows XP
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</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>mike.benfield@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>$ cat trash.s
.intel_syntax noprefix
.text
.global _func
_func:
lea rdx, [rax + -1*rcx]
$ clang trash.s
0 libLLVM.dylib 0x000000010866c803
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 libLLVM.dylib 0x000000010866be63 llvm::sys::RunSignalHandlers() +
83
2 libLLVM.dylib 0x000000010866cc0b SignalHandler(int) + 183
3 libsystem_platform.dylib 0x00007fffd7f73b3a _sigtramp + 26
4 libsystem_platform.dylib 0x00007fff58a3c028 _sigtramp + 2158789896
5 libLLVM.dylib 0x0000000109775a34 (anonymous
namespace)::X86MCCodeEmitter::encodeInstruction(llvm::MCInst const&,
llvm::raw_ostream&, llvm::SmallVectorImpl<llvm::MCFixup>&,
llvm::MCSubtargetInfo const&) const + 9354
6 libLLVM.dylib 0x0000000108eb72ed (anonymous
namespace)::MCMachOStreamer::EmitInstToData(llvm::MCInst const&,
llvm::MCSubtargetInfo const&) + 241
7 libLLVM.dylib 0x000000010974df8b (anonymous
namespace)::X86AsmParser::MatchAndEmitInstruction(llvm::SMLoc, unsigned int&,
llvm::SmallVectorImpl<std::__1::unique_ptr<llvm::MCParsedAsmOperand,
std::__1::default_delete<llvm::MCParsedAsmOperand> > >&, llvm::MCStreamer&,
unsigned long long&, bool) + 4569
8 libLLVM.dylib 0x0000000108ed8778 (anonymous
namespace)::AsmParser::parseStatement((anonymous
namespace)::ParseStatementInfo&, llvm::MCAsmParserSemaCallback*) + 7554
9 libLLVM.dylib 0x0000000108ed3182 (anonymous
namespace)::AsmParser::Run(bool, bool) + 454
10 clang 0x00000001071c7de7 cc1as_main(llvm::ArrayRef<char
const*>, char const*, void*) + 10505
11 clang 0x00000001071c386b main + 8361
12 libdyld.dylib 0x00007fffd7d64235 start + 1
13 libdyld.dylib 0x0000000000000014 start + 673824224
Stack dump:
0. Program arguments: /opt/local/libexec/llvm-4.0/bin/clang -cc1as -triple
x86_64-apple-macosx10.12.0 -filetype obj -main-file-name trash.s -target-cpu
penryn -fdebug-compilation-dir
/Users/mike/Dropbox/Repositories/assembly_experiments/isort
-dwarf-debug-producer clang version 4.0.0 (tags/RELEASE_400/final)
-dwarf-version=4 -mrelocation-model pic -o
/var/folders/y3/b1583v4s5lsg2m3xl74dv9r80000gn/T/trash-d44a57.o
/var/folders/y3/b1583v4s5lsg2m3xl74dv9r80000gn/T/trash-f3b08f.s
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang integrated assembler command failed due to signal (use -v
to see invocation)</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>