[PATCH] D26016: BitcodeReader: Require clients to read the block info block at most once.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 14:41:45 PDT 2016
pcc updated this revision to Diff 76103.
pcc marked an inline comment as done.
pcc added a comment.
Error out instead of asserting
https://reviews.llvm.org/D26016
Files:
llvm/lib/Bitcode/Reader/BitstreamReader.cpp
Index: llvm/lib/Bitcode/Reader/BitstreamReader.cpp
===================================================================
--- llvm/lib/Bitcode/Reader/BitstreamReader.cpp
+++ llvm/lib/Bitcode/Reader/BitstreamReader.cpp
@@ -319,9 +319,9 @@
}
bool BitstreamCursor::ReadBlockInfoBlock() {
- // If this is the second stream to get to the block info block, skip it.
+ // We expect the client to read the block info block at most once.
if (getBitStreamReader()->hasBlockInfoRecords())
- return SkipBlock();
+ report_fatal_error("Duplicate read of block info block");
if (EnterSubBlock(bitc::BLOCKINFO_BLOCK_ID)) return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26016.76103.patch
Type: text/x-patch
Size: 637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161027/b85ee575/attachment.bin>
More information about the llvm-commits
mailing list