[llvm] [BitstreamReader] Fix 32-bit overflow (PR #117363)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 13:17:55 PST 2024


================
@@ -334,7 +334,8 @@ Expected<unsigned> BitstreamCursor::readRecord(unsigned AbbrevID,
 
----------------
rnk wrote:

To me this raises a question of whether we want to support writing 4GB+ blobs in bitcode files. We could use ReadVBR64(6) above and EmitVBR64(6) on the [writer side](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Bitstream/BitstreamWriter.h#L550), and I think that would be backwards compatible, it just widens the maximum encodable value.

https://github.com/llvm/llvm-project/pull/117363


More information about the llvm-commits mailing list