[all-commits] [llvm/llvm-project] 6b618a: [llvm] fix zlib buffer truncate edge cases and fix...

Cole Kissane via All-commits all-commits at lists.llvm.org
Wed Jul 13 15:08:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b618a620f0b964f78c176a9dc94bcc35bf0db68
      https://github.com/llvm/llvm-project/commit/6b618a620f0b964f78c176a9dc94bcc35bf0db68
  Author: Cole Kissane <cole.kissane at gmail.com>
  Date:   2022-07-13 (Wed, 13 Jul 2022)

  Changed paths:
    M llvm/cmake/config-ix.cmake
    M llvm/lib/Support/Compression.cpp
    M llvm/unittests/Support/CompressionTest.cpp

  Log Message:
  -----------
  [llvm] fix zlib buffer truncate edge cases and fix nits in tests

- add check before truncating (un)compressed data buffer if the buffer is already a perfect length, to avoid triggering truncate assertion in edge case.
- explictly coerce LLVM_ENABLE_ZLIB to a 0 or 1 value in OFF case, to match current ON, FORCE_ON behavior.
- fix code style nits in zlib tests

Reviewed By: phosek

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




More information about the All-commits mailing list