[all-commits] [llvm/llvm-project] 935c0d: [Offload] Fix dangling memory references / leaks (...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Sep 29 19:56:48 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 935c0d5a3e704b8b21a1738d1e0ea8305f855a37
      https://github.com/llvm/llvm-project/commit/935c0d5a3e704b8b21a1738d1e0ea8305f855a37
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-09-30 (Wed, 30 Sep 2026)

  Changed paths:
    M offload/plugins-nextgen/common/include/PluginInterface.h

  Log Message:
  -----------
  [Offload] Fix dangling memory references / leaks (#227411)

Summary:
Two small tweaks. First, the allocator creates memory for the type via
placement new, but does not deallocate it with the destructor. This is
UB and is fixed by explicitly callling the type's destructor. Second,
the plugins were only 'released', which was likely just being confused
with `reset`. Release returns the pointer, essentially giving up
ownership, but we never take the pointer so it just dangles. The correct
spelling is 'reset'.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list