[llvm-bugs] [Bug 33661] New: clang's assembler crashes when given a bogus scalar multiple in lea

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 30 10:47:22 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33661

            Bug ID: 33661
           Summary: clang's assembler crashes when given a bogus scalar
                    multiple in lea
           Product: new-bugs
           Version: 4.0
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mike.benfield at gmail.com
                CC: llvm-bugs at lists.llvm.org

$ 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)

-- 
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/20170630/92442e9b/attachment.html>


More information about the llvm-bugs mailing list