[all-commits] [llvm/llvm-project] 37cf7d: [flang][cuda] Fix invalid host free of managed all...

Zhen Wang via All-commits all-commits at lists.llvm.org
Thu Jul 16 11:40:01 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 37cf7d04a3a7ec460aabed51a9a383d60bc63572
      https://github.com/llvm/llvm-project/commit/37cf7d04a3a7ec460aabed51a9a383d60bc63572
  Author: Zhen Wang <zhenw at nvidia.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M flang/lib/Lower/ConvertCall.cpp
    A flang/test/Lower/CUDA/cuda-managed-func-result.cuf

  Log Message:
  -----------
  [flang][cuda] Fix invalid host free of managed allocatable function results (#209945)

An allocatable function result with a CUDA data attribute is allocated
with the CUDA allocator, but the caller freed the temporary with a host
`free` (via `hlfir.destroy` → `fir.freemem`), corrupting the heap.
Release it through the CUDA-aware deallocation (`cuf.deallocate`)
instead.



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