[all-commits] [llvm/llvm-project] df182e: Fix an overflow issue at BackpatchWord

Jianzhou Zhao via All-commits all-commits at lists.llvm.org
Wed Aug 26 21:47:36 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: df182eb2d5fcb3ea2407097d5d2092a024c91859
      https://github.com/llvm/llvm-project/commit/df182eb2d5fcb3ea2407097d5d2092a024c91859
  Author: Jianzhou Zhao <jianzhouzh at google.com>
  Date:   2020-08-27 (Thu, 27 Aug 2020)

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

  Log Message:
  -----------
  Fix an overflow issue at BackpatchWord

This happens when generating a huge file by LTO, for example, with -gmlt.
When BitNo is > 2^35, ByteNo is overflowed, and an incorrect output offset is overwritten.
This generates ill-formed bitcodes.

Reviewed-by: tejohnson, vitalybuka

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




More information about the All-commits mailing list