[all-commits] [llvm/llvm-project] 9ddb1a: [Attributor][FIX] Avoid double free (and useless s...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Fri Mar 11 08:10:54 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ddb1a49ac08d8cd66771de56d5c3227d586b579
      https://github.com/llvm/llvm-project/commit/9ddb1a49ac08d8cd66771de56d5c3227d586b579
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-03-11 (Fri, 11 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp

  Log Message:
  -----------
  [Attributor][FIX] Avoid double free (and useless state copy)

In an attempt to remove the memory leak we introduced a double free.
The problem was that we allowed a plain copy of the state and it was
actually used. The use was useless, so it is gone now. The copy
constructor is gone as well. The move constructor ensures the Accesses
pointers are owned by a single state, I hope.

Reported by: https://lab.llvm.org/buildbot/#/builders/16/builds/25820




More information about the All-commits mailing list