[Openmp-commits] [PATCH] D74837: [LIBOMPTARGET]Fix PR44933: fix crash because of the too early deinitialization of libomptarget.

Alexey Bataev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Feb 19 07:55:42 PST 2020


ABataev created this revision.
ABataev added reviewers: grokos, hfinkel.
Herald added a project: OpenMP.

Instead of using global variables with unpredicted time of
deinitialization, use dynamically allocated variables with functions
explicitly marked as global constructor/destructor and priority. This
allows to prevent the crash because of the incorrect order of dynamic
libraries deinitialization.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74837

Files:
  openmp/libomptarget/src/api.cpp
  openmp/libomptarget/src/device.cpp
  openmp/libomptarget/src/interface.cpp
  openmp/libomptarget/src/omptarget.cpp
  openmp/libomptarget/src/rtl.cpp
  openmp/libomptarget/src/rtl.h
  openmp/libomptarget/test/offloading/dynamic_module_load.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74837.245405.patch
Type: text/x-patch
Size: 19327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200219/17baad3a/attachment-0001.bin>


More information about the Openmp-commits mailing list