[PATCH] D119307: [Bitstream] Fix UB in left-shift in ReadVBR
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 9 00:27:51 PST 2022
nikic added a comment.
Can you please rebase this on main and clarify which UB this addresses that is not covered by either https://github.com/llvm/llvm-project/commit/67348c8acfc205785996f2aea21b442f4b76f2c2 or https://github.com/llvm/llvm-project/commit/bf17cb294af422512b522575f3f74ab7964bf911? Please note that `-fsanitize=integer` includes a number of checks that are not actually undefined behavior. Some of the warnings quoted in the summary definitely cannot be fixed (e.g. DJB overflow is expected).
I believe a correct NumBits value is supposed to be a caller invariant (though this should probably be at least an assertion), which previously was not enforced in some cases due to an incorrect MaxChunkSize value.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119307/new/
https://reviews.llvm.org/D119307
More information about the llvm-commits
mailing list