LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1326 - legalize crash with C++ EH
Summary: legalize crash with C++ EH
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Common Code Generator Code (show other bugs)
Version: trunk
Hardware: Other Linux
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords: compile-fail
Depends on:
Blocks:
 
Reported: 2007-04-14 06:18 PDT by Duncan Sands
Modified: 2010-02-22 12:53 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments
Bytecode causing the crash (414 bytes, application/octet-stream)
2007-04-14 06:19 PDT, Duncan Sands
Details
testcase .ll reduced from C++ run-time (821 bytes, text/plain)
2007-04-16 09:07 PDT, Duncan Sands
Details
ultimately reduced .ll testcase (563 bytes, text/plain)
2007-04-16 09:10 PDT, Duncan Sands
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Sands 2007-04-14 06:18:49 PDT
$ llc -enable-eh eh.bc
llc: /home/duncan/tmp/llvm.master/include/llvm/CodeGen/SelectionDAGNodes.h:904: 
llvm::MVT::ValueType llvm::SDNode::getValueType(unsigned int) const: Assertion 
`ResNo < NumValues && "Illegal result number!"' failed.
llc((anonymous namespace)::PrintStackTrace()+0x1a)[0x891f23a]
llc((anonymous namespace)::SignalHandler(int)+0x112)[0x891f500]
[0xffffe420]
/lib/tls/i686/cmov/libc.so.6(abort+0x101)[0xb7ce5641]
/lib/tls/i686/cmov/libc.so.6(__assert_fail+0xfb)[0xb7cdd43b]
llc(llvm::SDNode::getValueType(unsigned int) const+0x39)[0x844c925]
llc(llvm::SDOperand::getValueType() const+0x1d)[0x844c955]
llc[0x86f5c5b]
llc[0x86e9c8d]
llc[0x8704eef]
llc[0x870535e]
llc(llvm::SelectionDAG::Legalize()+0x41)[0x87054f7]
llc(llvm::SelectionDAGISel::CodeGenAndEmitDAG(llvm::SelectionDAG&)+0x93)
[0x869fde9]
llc(llvm::SelectionDAGISel::SelectBasicBlock(llvm::BasicBlock*, 
llvm::MachineFunction&, llvm::FunctionLoweringInfo&)+0xb5)[0x86b555d]
llc(llvm::SelectionDAGISel::runOnFunction(llvm::Function&)+0x11f)[0x86b7173]
llc[0x8576643]
llc(llvm::FPPassManager::runOnFunction(llvm::Function&)+0x13a)[0x88ac6d2]
llc(llvm::FunctionPassManagerImpl::run(llvm::Function&)+0x6e)[0x88ac956]
llc(llvm::FunctionPassManager::run(llvm::Function&)+0x88)[0x88aca16]
llc(main+0xbe9)[0x8410959]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb7ccfebc]
llc[0x840ec11]
Aborted (core dumped)
Comment 1 Duncan Sands 2007-04-14 06:19:33 PDT
Created attachment 776 [details]
Bytecode causing the crash
Comment 2 Duncan Sands 2007-04-16 08:55:48 PDT
PS: This problem stops the C++ runtime from building with -enable-eh.
Comment 3 Duncan Sands 2007-04-16 09:07:57 PDT
Created attachment 784 [details]
testcase .ll reduced from C++ run-time
Comment 4 Duncan Sands 2007-04-16 09:10:46 PDT
Created attachment 785 [details]
ultimately reduced .ll testcase
Comment 5 Chris Lattner 2007-04-27 12:13:43 PDT
Fixed, testcase here: CodeGen/Generic/2007-04-14-EHSelectorCrash.ll

Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070423/048557.html

-Chris