[all-commits] [llvm/llvm-project] be5b84: [mlir] fix memory leak on failure path in parser

ftynse via All-commits all-commits at lists.llvm.org
Fri Mar 12 00:24:34 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: be5b844a354240007de05b67f6be7b48e1bbb25c
      https://github.com/llvm/llvm-project/commit/be5b844a354240007de05b67f6be7b48e1bbb25c
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2021-03-12 (Fri, 12 Mar 2021)

  Changed paths:
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  [mlir] fix memory leak on failure path in parser

Forward references to blocks lead to `Block`s being allocated in the
parser, but they are not necessarily included into a region if parsing
fails, leading to a leak. Clean them up in parser destructor.

Reviewed By: rriddle, mehdi_amini

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




More information about the All-commits mailing list