[PATCH] D109655: [BitcodeReader] fix a logic error in vector type element validation
William Woodruff via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 14 17:13:11 PDT 2021
woodruffw updated this revision to Diff 372593.
woodruffw added a comment.
Increase the context for the patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109655/new/
https://reviews.llvm.org/D109655
Files:
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp
===================================================================
--- llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1923,7 +1923,7 @@
if (Record[0] == 0)
return error("Invalid vector length");
ResultTy = getTypeByID(Record[1]);
- if (!ResultTy || !StructType::isValidElementType(ResultTy))
+ if (!ResultTy || !VectorType::isValidElementType(ResultTy))
return error("Invalid type");
bool Scalable = Record.size() > 2 ? Record[2] : false;
ResultTy = VectorType::get(ResultTy, Record[0], Scalable);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109655.372593.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210915/96907470/attachment.bin>
More information about the llvm-commits
mailing list