[all-commits] [llvm/llvm-project] ed0f21: [openmp][amdgpu] Tear down amdgpu plugin accurately

Jon Chesterfield via All-commits all-commits at lists.llvm.org
Thu Jul 28 12:00:23 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed0f21811544320f829124efbb6a38ee12eb9155
  Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
  Date:   2022-07-28 (Thu, 28 Jul 2022)

  Changed paths:
    M openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
    M openmp/libomptarget/src/rtl.cpp

  Log Message:
  [openmp][amdgpu] Tear down amdgpu plugin accurately

Moves DeviceInfo global to heap to accurately control lifetime.
Moves calls from libomptarget to deinit_plugin later, plugins need to stay
alive until very shortly before libomptarget is destructed.

Leaving the deinit_plugin calls where initially inserted hits use after
free from the dynamic_module.c offloading test (verified with valgrind
 that the new location is sound with respect to this)

Reviewed By: tianshilei1992

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

More information about the All-commits mailing list