[all-commits] [llvm/llvm-project] 63cef6: [LIBOMPTARGET]Fix PR44933: fix crash because of th...
Alexey Bataev via All-commits
all-commits at lists.llvm.org
Tue Feb 25 12:59:44 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 63cef621f954eb87c494021725f4eeac89132d16
https://github.com/llvm/llvm-project/commit/63cef621f954eb87c494021725f4eeac89132d16
Author: Alexey Bataev <a.bataev at hotmail.com>
Date: 2020-02-25 (Tue, 25 Feb 2020)
Changed paths:
M openmp/libomptarget/src/api.cpp
M openmp/libomptarget/src/device.cpp
M openmp/libomptarget/src/interface.cpp
M openmp/libomptarget/src/omptarget.cpp
M openmp/libomptarget/src/rtl.cpp
M openmp/libomptarget/src/rtl.h
A openmp/libomptarget/test/offloading/dynamic_module_load.c
Log Message:
-----------
[LIBOMPTARGET]Fix PR44933: fix crash because of the too early deinitialization of libomptarget.
Summary:
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.
Reviewers: grokos, hfinkel
Subscribers: caomhin, kkwli0, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D74837
More information about the All-commits
mailing list