[OpenMP] Fixes for shared memory cleanup when aborts occur

Patch by Erdner, Todd <todd.erdner@intel.com>

Differential Revision: https://reviews.llvm.org/D90974
This commit is contained in:
AndreyChurbanov 2020-11-11 00:16:23 +03:00
parent 544ef42e40
commit 33da6bd7f5

View File

@ -441,6 +441,7 @@ void __kmp_abort_process() {
raise(SIGABRT);
_exit(3); // Just in case, if signal ignored, exit anyway.
} else {
__kmp_unregister_library();
abort();
}
@ -6170,6 +6171,7 @@ void __kmp_internal_end_library(int gtid_req) {
if (__kmp_root[gtid]->r.r_active) {
__kmp_global.g.g_abort = -1;
TCW_SYNC_4(__kmp_global.g.g_done, TRUE);
__kmp_unregister_library();
KA_TRACE(10,
("__kmp_internal_end_library: root still active, abort T#%d\n",
gtid));