[PATCH] D119307: [Bitstream] Fix UB in left-shift in ReadVBR

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 12 00:53:22 PST 2022


nikic added a comment.

In D119307#3316281 <https://reviews.llvm.org/D119307#3316281>, @jkorous wrote:

> @nikic Sorry, my statement was incorrect. What I meant is that the method doesn't prevent UB via assert or runtime check of `NumBits` value.
> I'm happy to go with assert if that'd be a better fit.

Yes, I think an assert would be a better fit here semantically.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119307/new/

https://reviews.llvm.org/D119307



More information about the llvm-commits mailing list