[all-commits] [llvm/llvm-project] ee9bbf: [clang][Interp] Make sure we free() allocated Init...

Timm Bäder via All-commits all-commits at lists.llvm.org
Fri Oct 28 08:01:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ee9bbfa5e6acaea6d2a116bc29b7086441f86b6a
      https://github.com/llvm/llvm-project/commit/ee9bbfa5e6acaea6d2a116bc29b7086441f86b6a
  Author: Timm Bäder <tbaeder at redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M clang/lib/AST/Interp/Descriptor.cpp
    M clang/lib/AST/Interp/InterpBlock.h
    M clang/lib/AST/Interp/Pointer.cpp
    M clang/lib/AST/Interp/Program.cpp
    M clang/lib/AST/Interp/Program.h

  Log Message:
  -----------
  [clang][Interp] Make sure we free() allocated InitMaps

They get allocated when calling initialize() on a primitive array. And
they get free'd when the array is fully initialized. However, when that
never happens, they get leaked. Fix that by calling the destructor of
global variables.

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




More information about the All-commits mailing list