[LLVMbugs] [Bug 4591] New: uninitialized LLVMContext used by InstructionCombining pass . Kaleidoscope testcase crash.
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Jul 20 03:19:13 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4591
Summary: uninitialized LLVMContext used by InstructionCombining
pass. Kaleidoscope testcase crash.
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: xerxes at zafena.se
CC: llvmbugs at cs.uiuc.edu
Testcase:
echo "def test(x) 1+x;" | Kaleidoscope
ready> ready> Stack dump:
0. Running pass 'Combine redundant instructions' on function '@test'
Segmenteringsfel
(gdb) bt
#0 0x08199c16 in llvm::LLVMContext::getConstantFP (this=0x0, V=@0xbfd3a004) at
/home/xerxes/llvm/lib/VMCore/LLVMContext.cpp:485
#1 0x0819b534 in llvm::LLVMContext::getNullValue (this=0x0, Ty=0x8a661c8) at
/home/xerxes/llvm/lib/VMCore/LLVMContext.cpp:46
#2 0x0819b7fa in llvm::LLVMContext::getConstantFPNegativeZero (this=0x0,
Ty=0x8a661c8) at /home/xerxes/llvm/lib/VMCore/LLVMContext.cpp:521
#3 0x082cdf68 in visitFAdd (this=0x8a8c310, I=@0x8a92d58) at
/home/xerxes/llvm/lib/Transforms/Scalar/InstructionCombining.cpp:2377
#4 0x08310a5c in visit (this=0x8a8c310, I=@0x0) at
/home/xerxes/llvm/include/llvm/Instruction.def:108
#5 0x0831412c in DoOneIteration (this=0x8a8c310, F=@0x8a92840, Iteration=0) at
/home/xerxes/llvm/lib/Transforms/Scalar/InstructionCombining.cpp:13079
#6 0x08314b6d in runOnFunction (this=0x8a8c310, F=@0x8a92840) at
/home/xerxes/llvm/lib/Transforms/Scalar/InstructionCombining.cpp:13157
#7 0x081b15c7 in llvm::FPPassManager::runOnFunction (this=0x8a8a990,
F=@0x8a92840) at /home/xerxes/llvm/lib/VMCore/PassManager.cpp:1372
#8 0x081b19da in llvm::FunctionPassManagerImpl::run (this=0x8a89360,
F=@0x8a92840) at /home/xerxes/llvm/lib/VMCore/PassManager.cpp:1324
#9 0x081b1c0f in llvm::FunctionPassManager::run (this=0xbfd3a8c4,
F=@0x8a92840) at /home/xerxes/llvm/lib/VMCore/PassManager.cpp:1254
#10 0x0812aad4 in FunctionAST::Codegen (this=0x8a92728) at
/home/xerxes/llvm/examples/Kaleidoscope/toy.cpp:989
#11 0x0812ec8f in main () at
/home/xerxes/llvm/examples/Kaleidoscope/toy.cpp:1010
(gdb)
On frame #3 InstructionCombining.cpp:2377 the instruction combining pass calls
a static function of a uninitialised LLVMContext that eventually results into a
crash when the Context wants to dereference the LLVMContext::pImpl pointer in
frame #0.
--
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