[all-commits] [llvm/llvm-project] 206caf: Follow up to 9fd9d56dc6b, avoid a memory leak

Jeremy Morse via All-commits all-commits at lists.llvm.org
Wed Feb 2 08:01:32 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 206cafb680cea0741f8c7b276351db516ff27f81
      https://github.com/llvm/llvm-project/commit/206cafb680cea0741f8c7b276351db516ff27f81
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2022-02-02 (Wed, 02 Feb 2022)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp

  Log Message:
  -----------
  Follow up to 9fd9d56dc6b, avoid a memory leak

Gaps in the basic block number range (from blocks being deleted or folded)
get block-value-tables allocated but never ejected, leading to a memory
leak, currently tripping up the asan buildbots. Fix this up by manually
freeing that memory.

As suggested elsewhere, if these things were owned by a unique_ptr then
cleanup would happen automagically. D118774 should eliminate the need for
this dance.




More information about the All-commits mailing list