[all-commits] [llvm/llvm-project] 478498: Fix a 32-bit overflow issue when reading LTO-gener...

Jianzhou Zhao via All-commits all-commits at lists.llvm.org
Tue Aug 25 22:51:31 PDT 2020


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

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

  Log Message:
  -----------
  Fix a 32-bit overflow issue when reading LTO-generated bitcode files whose strtab are of size > 2^29

This happens when using -flto and -Wl,--plugin-opt=emit-llvm to create a linked LTO bitcode file, and the bitcode file has a strtab with size > 2^29.

All the issues relate to a pattern like this
  size_t x64 = y64 + z32 * C
  When z32 is >= (2^32)/C, z32 * C overflows.

Reviewed-by: MaskRay

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




More information about the All-commits mailing list