[LLVMbugs] [Bug 7662] New: code generator crash with -g and -O[123]
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jul 17 18:50:11 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7662
Summary: code generator crash with -g and -O[123]
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: mike at fluffypenguin.org
CC: llvmbugs at cs.uiuc.edu
I found a crash with llvm trunk at r108631. It requires -g and -O[123]. -O0 or
-g0 prevent the crash.
C++ code that shows the crash [this is boost 1.42]
========================================
#include <boost/function.hpp>
typedef boost::function<void(void)> func_t;
struct def_func {
void operator()() {}
};
void set_func( func_t ) { }
void run() {
set_func( def_func() );
}
========================================
This seems to be a code generator bug.
========================================
mike at hyperion:~/debug> bugpoint -run-llc test.bc
(master:debug)
Read input file : 'test.bc'
*** All input ok
Initializing execution environment: Found gcc: /usr/bin/gcc
Running the code generator to test for a crash: <llc>
Error running tool:
/usr/bin/llc -o bugpoint-test-program.bc-wnDzvS.llc.s
bugpoint-test-program.bc-wnDzvS
0 llc 0x0000000000aa38ef
1 llc 0x0000000000aa3e89
2 libpthread.so.0 0x00007f7ae8a2c070
3 llc 0x0000000000764bdc llvm::DwarfDebug::endModule() + 2908
4 llc 0x000000000074d9a5
llvm::AsmPrinter::doFinalization(llvm::Module&) + 341
5 llc 0x0000000000a2e778
llvm::FPPassManager::doFinalization(llvm::Module&) + 56
6 llc 0x0000000000a31abf
llvm::FPPassManager::runOnModule(llvm::Module&) + 95
7 llc 0x0000000000a3167c
llvm::MPPassManager::runOnModule(llvm::Module&) + 508
8 llc 0x0000000000a3175e llvm::PassManagerImpl::run(llvm::Module&)
+ 110
9 llc 0x00000000004f846e main + 4334
10 libc.so.6 0x00007f7ae7b2eb6d __libc_start_main + 253
11 llc 0x00000000004f72b9
Stack dump:
0. Program arguments: /usr/bin/llc -o
bugpoint-test-program.bc-wnDzvS.llc.s bugpoint-test-program.bc-wnDzvS
1. Running pass 'Function Pass Manager' on module
'bugpoint-test-program.bc-wnDzvS'.
*** Debugging code generator crash!
Checking to see if we can delete global inits: UNREACHABLE executed!
0 bugpoint 0x00000000008c7a3f
1 bugpoint 0x00000000008c7fd9
2 libpthread.so.0 0x00007f9ea5042070
3 libc.so.6 0x00007f9ea4158545 gsignal + 53
4 libc.so.6 0x00007f9ea41599c6 abort + 390
5 bugpoint 0x00000000008a8d8e llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int) + 350
6 bugpoint 0x00000000004e0be9
7 bugpoint 0x00000000004e88a6
8 bugpoint 0x00000000004ea2ee llvm::WriteBitcodeToFile(llvm::Module
const*, llvm::raw_ostream&) + 190
9 bugpoint 0x00000000004ced9d
llvm::BugDriver::writeProgramToFile(std::string const&, llvm::Module*) const +
109
10 bugpoint 0x00000000004baa47
llvm::BugDriver::compileProgram(llvm::Module*, std::string*) + 199
11 bugpoint 0x00000000004aed0f
12 bugpoint 0x00000000004b23f2
13 bugpoint 0x00000000004acdd9 llvm::BugDriver::run(std::string&) + 601
14 bugpoint 0x00000000004dad08 main + 664
15 libc.so.6 0x00007f9ea4144b6d __libc_start_main + 253
16 bugpoint 0x00000000004ac879
Stack dump:
0. Program arguments: bugpoint -run-llc test.bc
[2] 15976 abort bugpoint -run-llc test.bc
========================================
I've attached the bc file produced by -emit-llvm
--
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