Fix PR 4170 by having ExtractValueInst::getIndexedType() reject out-of-bounds indexing.
authorFrits van Bommel <fvbommel@gmail.com>
Sun, 5 Dec 2010 20:50:26 +0000 (20:50 +0000)
committerFrits van Bommel <fvbommel@gmail.com>
Sun, 5 Dec 2010 20:50:26 +0000 (20:50 +0000)
commita4805cf6efbcd405916cdd0eb4b6170231e906c7
tree7f10020b63a6676f0387f7ed29f10a39c79c4b28
parent120188605fd1e3228c65daf2c5cd6c7a62d6a335
Fix PR 4170 by having ExtractValueInst::getIndexedType() reject out-of-bounds indexing.

Also add asserts that the indices are valid in InsertValueInst::init(). ExtractValueInst already asserts when constructed with invalid indices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120956 91177308-0d34-0410-b5e6-96231b3b80d8
lib/VMCore/Instructions.cpp
test/Assembler/extractvalue-invalid-idx.ll [new file with mode: 0644]
test/Assembler/insertvalue-invalid-idx.ll [new file with mode: 0644]