Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verifier doesn't reject store of an aggregate #1198

Closed
llvmbot opened this issue Jul 11, 2006 · 4 comments
Closed

verifier doesn't reject store of an aggregate #1198

llvmbot opened this issue Jul 11, 2006 · 4 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla crash-on-invalid llvm:core

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jul 11, 2006

Bugzilla Link 826
Resolution FIXED
Resolved on Feb 22, 2010 12:47
Version 1.0
OS All
Attachments Bugpoint reduced test case
Reporter LLVM Bugzilla Contributor

Extended Description

The following test case produces this assertion failure:

llc: /proj/llvm/build/../llvm/include/llvm/Target/TargetLowering.h:257:
llvm::MVT::ValueType llvm::TargetLowering::getValueType(const llvm::Type*)
const: Assertion `0 && "Unknown type!"' failed.

; ModuleID = 'bugpoint-reduced-simplified.bc'
target endian = little
target pointersize = 32
target triple = "i686-pc-linux-gnu"
%struct_4 = type { int, long, sbyte* }

implementation ; Functions:

void %func_37(int, ...) {
entry:
store %struct_4 zeroinitializer, %struct_4* null
unreachable
}

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 11, 2006

assigned to @lattner

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 11, 2006

Here's the stack trace:
#​0 0x00849402 in __kernel_vsyscall ()
#​1 0x0088f069 in raise () from /lib/libc.so.6
#​2 0x00890671 in abort () from /lib/libc.so.6
#​3 0x008889d9 in __assert_fail () from /lib/libc.so.6
#​4 0x084521ec in llvm::TargetLowering::getValueType (this=0x9ebf308, Ty=0x9ec27a0)
at /proj/llvm/build/../llvm/include/llvm/Target/TargetLowering.h:257
#​5 0x086f9394 in llvm::SelectionDAGLowering::getValue (this=0xbfcb0c60,
V=0x9ed3990)
at /proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:576
#​6 0x086feca5 in llvm::SelectionDAGLowering::visitStore (this=0xbfcb0c60,
I=@0x9ed39d0)
at /proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1381
#​7 0x08737b72 in llvm::SelectionDAGLowering::visit (this=0xbfcb0c60, Opcode=25,
I=@0x9ed39d0)
at /proj/llvm/build/../llvm/include/llvm/Instruction.def:119
#​8 0x08738ce5 in llvm::SelectionDAGLowering::visit (this=0xbfcb0c60, I=@0x9ed39d0)
at /proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:440
#​9 0x0870a0d6 in llvm::SelectionDAGISel::BuildSelectionDAG (this=0x9ebf2c0,
DAG=@0xbfcb1320, LLVMBB=0x9ed3150,
PHINodesToUpdate=@0xbfcb15c0, FuncInfo=@0xbfcb1600) at
/proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:3394
#​10 0x0870abaf in llvm::SelectionDAGISel::SelectBasicBlock (this=0x9ebf2c0,
LLVMBB=0x9ed3150, MF=@0x9ed0b40, FuncInfo=@0xbfcb1600)
at /proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:3537
#​11 0x08709314 in llvm::SelectionDAGISel::runOnFunction (this=0x9ebf2c0,
Fn=@0x9ec67e0)
at /proj/llvm/build/../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:3268
#​12 0x085b3f79 in (anonymous namespace)::X86DAGToDAGISel::runOnFunction
(this=0x9ebf2c0, Fn=@0x9ec67e0)
at /proj/llvm/build/../llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:105
#​13 0x0890dc47 in llvm::FunctionPassManagerT::runPass (this=0x9ec5ec8,
P=0x9ebf2c0, F=0x9ec67e0)
at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:795
#​14 0x0890c3dc in llvm::PassManagerTllvm::FTraits::runPasses (this=0x9ec5ee0,
M=0x9ec67e0, LastUserOf=@0xbfcb17d0)
at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:596
#​15 0x0890c263 in llvm::PassManagerTllvm::FTraits::runOnUnit (this=0x9ec5ee0,
M=0x9ec67e0)
at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:282
#​16 0x0890dce5 in llvm::FunctionPassManagerT::runOnFunction (this=0x9ec5ec8,
F=@0x9ec67e0)
at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:884
#​17 0x088f951f in llvm::FunctionPass::runOnModule (this=0x9ec5ec8, M=@0x9ebc998)
at /proj/llvm/build/../llvm/lib/VMCore/Pass.cpp:245
#​18 0x0890f80d in llvm::ModulePassManager::runPass (this=0x9ec8ae0, P=0x9ec5ec8,
M=0x9ebc998)
at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:837
#​19 0x0890e64a in llvm::PassManagerTllvm::MTraits::runPasses (this=0x9ec8af8,
M=0x9ebc998, LastUserOf=@0xbfcb1950)
at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:596
#​20 0x0890e4d1 in llvm::PassManagerTllvm::MTraits::runOnUnit (this=0x9ec8af8,
M=0x9ebc998)
at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:282
#​21 0x088f85e3 in llvm::ModulePassManager::runOnModule (this=0x9ec8ae0,
M=@0x9ebc998)
at /proj/llvm/build/../llvm/lib/VMCore/PassManagerT.h:905
#​22 0x088f8967 in llvm::PassManager::run (this=0xbfcb1b50, M=@0x9ebc998) at
/proj/llvm/build/../llvm/lib/VMCore/Pass.cpp:85
#​23 0x084228f6 in main (argc=6, argv=0xbfcb1c34) at
/proj/llvm/build/../llvm/tools/llc/llc.cpp:234

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 11, 2006

This looks to be a verifier bug in that invalid input was not caught before code
gen started.

@lattner
Copy link
Collaborator

lattner commented Jul 11, 2006

Fixed. Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060710/035965.html

Testcase here:
Regression/Verifier/2006-07-11-StoreStruct.ll

Thanks!

-Chris

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla crash-on-invalid llvm:core
Projects
None yet
Development

No branches or pull requests

2 participants