[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:48:57 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL285350: BitcodeReader: Require clients to read the block info block at most once. (authored by pcc).

Changed prior to commit:
  https://reviews.llvm.org/D26016?vs=76103&id=76107#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26016

Files:
  llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp


Index: llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp
===================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp
+++ llvm/trunk/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.76107.patch
Type: text/x-patch
Size: 655 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161027/1cc6cd6f/attachment.bin>


More information about the llvm-commits mailing list