Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

llc crashes with "UNREACHABLE executed at Value.cpp:620!" #14475

Open Quuxplusone opened 11 years ago

Quuxplusone commented 11 years ago
Bugzilla Link PR14455
Status NEW
Importance P normal
Reported by Max Kellermann (max@duempel.org)
Reported on 2012-11-29 04:35:11 -0800
Last modified on 2013-02-07 15:15:15 -0800
Version trunk
Hardware PC Linux
CC llvm-bugs@lists.llvm.org, pawel@32bitmicro.com, rafael@espindo.la, wenhan.gu@gmail.com
Fixed by commit(s)
Attachments TestRadixTree-opt.bc (214164 bytes, application/octet-stream)
Blocks
Blocked by
See also
I compiled LLVM from trunk r168861. I compile a program with clang to LLVM
bitcode, then llvm-link to build one large bitcode file, opt to optimize the
file, and then llc to generate assembly. llc crashes with the following message:

llc TestRadixTree-opt.bc
While deleting: metadata %
An asserting value handle still pointed to this value!
UNREACHABLE executed at Value.cpp:620!
0  llc             0x0000000000eb11e2
1  llc             0x0000000000eb1673
2  libpthread.so.0 0x00007f24916fc030
3  libc.so.6       0x00007f24909f2475 gsignal + 53
4  libc.so.6       0x00007f24909f56f0 abort + 384
5  llc             0x0000000000ea06a9 llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int) + 457
6  llc             0x0000000000e67be6
llvm::ValueHandleBase::ValueIsDeleted(llvm::Value*) + 806
7  llc             0x0000000000e6762e llvm::Value::~Value() + 46
8  llc             0x0000000000e48eae llvm::MDNode::destroy() + 14
9  llc             0x0000000000e453d9 llvm::LLVMContextImpl::~LLVMContextImpl()
+ 3225
10 llc             0x0000000000e43e4c
11 llc             0x0000000000ea39d9 llvm::llvm_shutdown() + 41
12 llc             0x000000000050f063 main + 6323
13 libc.so.6       0x00007f24909deead __libc_start_main + 253
14 llc             0x000000000050d6e9
Stack dump:
0.      Program arguments: llc TestRadixTree-opt.bc
Aborted

(LLVM bitcode file generated by "opt" is attached)
Quuxplusone commented 11 years ago

It may be interesting that llc can grow extremely large before crashing. Another bitcode file (56 MB) results in a 2.1 GB llc process before it crashes. Maybe this is normal, but maybe this is a memory leak, related to this crash bug?

Quuxplusone commented 11 years ago

Attached TestRadixTree-opt.bc (214164 bytes, application/octet-stream): Test file that makes llc crash

Quuxplusone commented 11 years ago

Problem still exists in r169984.

Quuxplusone commented 11 years ago

Problem still exists in r173101

Quuxplusone commented 11 years ago

Problem still exists in r174657

Quuxplusone commented 11 years ago
Correction: r174657 renders a different error message:

llc: DwarfDebug.cpp:1416: void llvm::DwarfDebug::beginFunction(const
llvm::MachineFunction *): Assertion `TheCU && "Unable to find compile unit!"'
failed.
0  llc             0x0000000000d45505 llvm::sys::PrintStackTrace(_IO_FILE*) + 37
1  llc             0x0000000000d459f3
2  libpthread.so.0 0x00007f6f2b46e030
3  libc.so.6       0x00007f6f2a55c475 gsignal + 53
4  libc.so.6       0x00007f6f2a55f6f0 abort + 384
5  libc.so.6       0x00007f6f2a555621 __assert_fail + 241
6  llc             0x000000000090d753
llvm::DwarfDebug::beginFunction(llvm::MachineFunction const*) + 3651
7  llc             0x00000000008f5aad llvm::AsmPrinter::EmitFunctionHeader() +
797
8  llc             0x0000000000541d24
9  llc             0x000000000099a61d
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 125
10 llc             0x0000000000ca699c
llvm::FPPassManager::runOnFunction(llvm::Function&) + 364
11 llc             0x0000000000ca6c0b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
12 llc             0x0000000000ca6f5e
llvm::MPPassManager::runOnModule(llvm::Module&) + 430
13 llc             0x0000000000ca75fb llvm::PassManagerImpl::run(llvm::Module&)
+ 539
14 llc             0x0000000000ca776a llvm::PassManager::run(llvm::Module&) + 10
15 llc             0x00000000004f17af main + 5407
16 libc.so.6       0x00007f6f2a548ead __libc_start_main + 253
17 llc             0x00000000004f01c9
Stack dump:
0.      Program arguments: llc /tmp/TestRadixTree-opt.bc
1.      Running pass 'Function Pass Manager' on module '/tmp/TestRadixTree-
opt.bc'.
2.      Running pass 'X86 AT&T-Style Assembly Printer' on function
'@_gen_result'
Aborted