[LLVMbugs] [Bug 13754] New: clang++ crashes on assembly with cfi directives
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Sep 2 03:44:17 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13754
Bug #: 13754
Summary: clang++ crashes on assembly with cfi directives
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: dvyukov at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
$ clang++ -v
clang version 3.2 (trunk 163014)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ cat tmp.S
.section .text
.globl thunk
thunk:
.cfi_startproc
push %rbx
.cfi_adjust_cfa_offset 8
.cfi_rel_offset %rbx, 0
mov %rsp, %rbx
.cfi_def_cfa_register rbx
call switch
.cfi_def_cfa_register rsp
pop %rbx
.cfi_adjust_cfa_offset -8
.cfi_endproc
ret
$ g++ -c tmp.S
$ clang++ -c tmp.S
clang:
/usr/local/google/home/dvyukov/llvm0/lib/Target/X86/AsmParser/X86AsmParser.cpp:519:
virtual bool<unnamed>::X86AsmParser::ParseRegister(unsigned int&, llvm::SMLoc&,
llvm::SMLoc&): Assertion `TokPercent.is(AsmToken::Percent) && "Invalid token
kind!"' failed.
0 clang 0x0000000001f7bfef
1 clang 0x0000000001f7defa
2 libpthread.so.0 0x00007f4c62bcd8f0
3 libc.so.6 0x00007f4c621d0a75 gsignal + 53
4 libc.so.6 0x00007f4c621d45c0 abort + 384
5 libc.so.6 0x00007f4c621c9941 __assert_fail + 241
6 clang 0x0000000001704634
7 clang 0x00000000019aa89b
8 clang 0x00000000019b6211
9 clang 0x00000000019b7289
10 clang 0x000000000065ce20
11 clang 0x000000000065dfd5 cc1as_main(char const**, char const**,
char const*, void*) + 1845
12 clang 0x0000000000662115 main + 7909
13 libc.so.6 0x00007f4c621bbc4d __libc_start_main + 253
14 clang 0x0000000000656999
Stack dump:
0. Program arguments:
/usr/local/google/home/dvyukov/llvm0/build/Release+Asserts/bin/clang -cc1as
-triple x86_64-unknown-linux-gnu -filetype obj -o tmp.o /tmp/tmp-mPHJLn.s
1. Program arguments: -triple x86_64-unknown-linux-gnu -filetype obj -o
tmp.o /tmp/tmp-mPHJLn.s
0 clang 0x0000000001f7bfef
1 clang 0x0000000001f7defa
2 libpthread.so.0 0x00007f4c62bcd8f0
3 libc.so.6 0x00007f4c621d0a75 gsignal + 53
4 libc.so.6 0x00007f4c621d45c0 abort + 384
5 libc.so.6 0x00007f4c621c9941 __assert_fail + 241
6 clang 0x0000000001704634
7 clang 0x00000000019aa89b
8 clang 0x00000000019b6211
9 clang 0x00000000019b7289
10 clang 0x000000000065ce20
11 clang 0x000000000065dfd5 cc1as_main(char const**, char const**,
char const*, void*) + 1845
12 clang 0x0000000000662115 main + 7909
13 libc.so.6 0x00007f4c621bbc4d __libc_start_main + 253
14 clang 0x0000000000656999
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang integrated assembler command failed due to signal (use -v
to see invocation)
clang version 3.2 (trunk 163014)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: 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: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/tmp-cq3Ud1
clang++:
/usr/local/google/home/dvyukov/llvm0/tools/clang/lib/Driver/Driver.cpp:558:
void
clang::driver::Driver::generateCompilationDiagnostics(clang::driver::Compilation&,
const clang::driver::Command*): Assertion `I != std::string::npos && "Expected
to find -main-file-name"' failed.
0 clang++ 0x0000000001f7bfef
1 clang++ 0x0000000001f7defa
2 libpthread.so.0 0x00007fde8d3d58f0
3 libc.so.6 0x00007fde8c9d8a75 gsignal + 53
4 libc.so.6 0x00007fde8c9dc5c0 abort + 384
5 libc.so.6 0x00007fde8c9d1941 __assert_fail + 241
6 clang++ 0x00000000007108ea
clang::driver::Driver::generateCompilationDiagnostics(clang::driver::Compilation&,
clang::driver::Command const*) + 7930
7 clang++ 0x00000000006615b9 main + 5001
8 libc.so.6 0x00007fde8c9c3c4d __libc_start_main + 253
9 clang++ 0x0000000000656999
Stack dump:
0. Program arguments: clang++ -c tmp.S
Aborted (core dumped)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list