[all-commits] [llvm/llvm-project] 171d8c: [Flang][OpenMP][MLIR] Fix memory leak caused by D1...

agozillon via All-commits all-commits at lists.llvm.org
Wed Sep 20 20:28:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 171d8c40288a995f7c34b0479f31241132af67a5
      https://github.com/llvm/llvm-project/commit/171d8c40288a995f7c34b0479f31241132af67a5
  Author: Andrew Gozillon <Andrew.Gozillon at amd.com>
  Date:   2023-09-20 (Wed, 20 Sep 2023)

  Changed paths:
    M flang/lib/Optimizer/Transforms/OMPEarlyOutlining.cpp
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  [Flang][OpenMP][MLIR] Fix memory leak caused by D149368 causing sanitizer error and fix iterator invalidation error

This patch fixes two issues introduced by the D149368 patch, one is
a memory leak from using the removeFromParent rather
than eraseFromParent (the erase also had to be moved to not create
use after deletes).

And the other is a possible iterator invalidation bug, better to be safe
than sorry.




More information about the All-commits mailing list