[all-commits] [llvm/llvm-project] 6280c2: [Bitstream] Add assert to ReadVBR and ReadVBR64

jkorous-apple via All-commits all-commits at lists.llvm.org
Tue Feb 15 17:13:00 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6280c29a870173601a7befb3b45f92025727c41d
      https://github.com/llvm/llvm-project/commit/6280c29a870173601a7befb3b45f92025727c41d
  Author: Jan Korous <jkorous at apple.com>
  Date:   2022-02-15 (Tue, 15 Feb 2022)

  Changed paths:
    M llvm/include/llvm/Bitstream/BitstreamReader.h

  Log Message:
  -----------
  [Bitstream] Add assert to ReadVBR and ReadVBR64

We want to prevent UB potentially caused by left-shifting by type bit-width.

Differential Revision: https://reviews.llvm.org/D119307


  Commit: 4a794d848ce81f41c6e23a4d3d3f70c2d7d1baa4
      https://github.com/llvm/llvm-project/commit/4a794d848ce81f41c6e23a4d3d3f70c2d7d1baa4
  Author: Jan Korous <jkorous at apple.com>
  Date:   2022-02-15 (Tue, 15 Feb 2022)

  Changed paths:
    M llvm/lib/Bitstream/Reader/BitstreamReader.cpp
    M llvm/test/Bitcode/invalid.test

  Log Message:
  -----------
  [Bitstream] Improve error propagation from ReadVBR

Differential Revision: https://reviews.llvm.org/D119307


Compare: https://github.com/llvm/llvm-project/compare/132553b8c7af...4a794d848ce8


More information about the All-commits mailing list