[LLVMbugs] [Bug 5729] New: Certain tail calls cause assertion failure
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Dec 8 17:27:36 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=5729
Summary: Certain tail calls cause assertion failure
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Backend: X86
AssignedTo: jyasskin at google.com
ReportedBy: jyasskin at google.com
CC: nicholas at mxc.ca, llvmbugs at cs.uiuc.edu
Created an attachment (id=3929)
--> (http://llvm.org/bugs/attachment.cgi?id=3929)
Crashing tail call
The attached IR crashes on x86-64 with the following assertion error:
$ Debug/bin/llvm-as ~/tmp/lli_crash.ll
$ Debug/bin/lli -disable-lazy-compilation ~/tmp/lli_crash.bc
$ gdb --args Debug/bin/lli -tailcallopt -disable-lazy-compilation
~/tmp/lli_crash.bc
(gdb) run
Starting program: /usr/local/google/jyasskin/llvm/trunk/obj/Debug/bin/lli
-tailcallopt -disable-lazy-compilation /home/jyasskin/tmp/lli_crash.bc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
lli:
/usr/local/google/jyasskin/llvm/trunk/src/lib/Target/X86/X86ISelLowering.cpp:2072:
virtual llvm::SDValue llvm::X86TargetLowering::LowerCall(llvm::SDValue,
llvm::SDValue, llvm::CallingConv::ID, bool, bool, const
llvm::SmallVectorImpl<llvm::ISD::OutputArg>&, const
llvm::SmallVectorImpl<llvm::ISD::InputArg>&, llvm::DebugLoc,
llvm::SelectionDAG&, llvm::SmallVectorImpl<llvm::SDValue>&): Assertion
`((Callee.getOpcode() == ISD::Register &&
(cast<RegisterSDNode>(Callee)->getReg() == X86::EAX ||
cast<RegisterSDNode>(Callee)->getReg() == X86::R9)) || Callee.getOpcode() ==
ISD::TargetExternalSymbol || Callee.getOpcode() == ISD::TargetGlobalAddress) &&
"Expecting an global address, external symbol, or register"' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff6813095 in raise () from /lib/libc.so.6
(gdb) bt
#0 0x00007ffff6813095 in raise () from /lib/libc.so.6
#1 0x00007ffff6814af0 in abort () from /lib/libc.so.6
#2 0x00007ffff680c2df in __assert_fail () from /lib/libc.so.6
#3 0x0000000000ad5cbe in llvm::X86TargetLowering::LowerCall (this=0x1675348,
Chain=...,
Callee=..., CallConv=llvm::CallingConv::Fast, isVarArg=false,
isTailCall=true,
Outs=..., Ins=..., dl=..., DAG=..., InVals=...)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/Target/X86/X86ISelLowering.cpp:2067
#4 0x0000000000bba289 in llvm::TargetLowering::LowerCallTo (this=0x1675348,
Chain=...,
RetTy=0x166c7d0, RetSExt=false, RetZExt=false, isVarArg=false,
isInreg=false,
NumFixedArgs=1, CallConv=llvm::CallingConv::Fast, isTailCall=true,
isReturnValueUsed=true, Callee=...,
Args=std::vector of length 1, capacity 1 = {...}, DAG=..., dl=...)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5428
#5 0x0000000000bc2843 in llvm::SelectionDAGBuilder::LowerCallTo
(this=0x1699a00,
CS=..., Callee=..., isTailCall=true, LandingPad=0x0)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4219
#6 0x0000000000bd2dd6 in llvm::SelectionDAGBuilder::visitCall (this=0x1699a00,
I=...)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4366
#7 0x0000000000bde98e in llvm::SelectionDAGBuilder::visit (this=0x1699a00,
Opcode=45,
I=...) at
/usr/local/google/jyasskin/llvm/trunk/src/include/llvm/Instruction.def:161
#8 0x0000000000bdea52 in llvm::SelectionDAGBuilder::visit (this=0x1699a00,
I=...)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:582
#9 0x0000000000bf4b78 in llvm::SelectionDAGISel::SelectBasicBlock
(this=0x1695500,
LLVMBB=0x16745d0, Begin=..., End=..., HadTailCall=@0x7fffffffdb9e)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:411
#10 0x0000000000bf5730 in llvm::SelectionDAGISel::SelectAllBasicBlocks
(this=0x1695500,
Fn=..., MF=..., MMI=0x16869b0, DW=0x169b320, TII=...)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:844
#11 0x0000000000bf6577 in llvm::SelectionDAGISel::runOnMachineFunction
(this=0x1695500,
mf=...)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:341
#12 0x0000000000d2e421 in llvm::MachineFunctionPass::runOnFunction
(this=0x1695500,
F=...)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/CodeGen/MachineFunctionPass.cpp:27
#13 0x0000000000fe2f10 in llvm::FPPassManager::runOnFunction (this=0x16788d0,
F=...)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/VMCore/PassManager.cpp:1336
#14 0x0000000000fe4b8f in llvm::FunctionPassManagerImpl::run (this=0x16782f0,
F=...)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/VMCore/PassManager.cpp:1288
#15 0x0000000000fe4d36 in llvm::FunctionPassManager::run (this=0x1675020,
F=...)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/VMCore/PassManager.cpp:1218
#16 0x0000000000cc8ae1 in llvm::JIT::runJITOnFunctionUnlocked (this=0x16807d0,
F=0x16732c0, locked=...)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/ExecutionEngine/JIT/JIT.cpp:601
#17 0x0000000000cc8f17 in llvm::JIT::getPointerToFunction (this=0x16807d0,
F=0x16732c0)
at
/usr/local/google/jyasskin/llvm/trunk/src/lib/ExecutionEngine/JIT/JIT.cpp:667
#18 0x00000000008e6e4c in main (argc=4, argv=0x7fffffffe298,
envp=0x7fffffffe2c0)
at /usr/local/google/jyasskin/llvm/trunk/src/tools/lli/lli.cpp:211
This was introduced in r88984.
--
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