[Openmp-commits] [PATCH] D90974: Fixes for shared memory cleanup when aborts occur
Todd Erdner via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Nov 6 14:15:06 PST 2020
terdner created this revision.
terdner added reviewers: jlpeyton, AndreyChurbanov, tlwilmar, hbae.
terdner added a project: OpenMP.
terdner requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
We found a few cases that didn't properly clean up shared memory for openmp RTL registration when aborts occurred. This patch fixes those cases.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90974
Files:
openmp/runtime/src/kmp_runtime.cpp
Index: openmp/runtime/src/kmp_runtime.cpp
===================================================================
--- openmp/runtime/src/kmp_runtime.cpp
+++ openmp/runtime/src/kmp_runtime.cpp
@@ -441,6 +441,7 @@
raise(SIGABRT);
_exit(3); // Just in case, if signal ignored, exit anyway.
} else {
+ __kmp_unregister_library();
abort();
}
@@ -6170,6 +6171,7 @@
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));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90974.303544.patch
Type: text/x-patch
Size: 680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201106/ad89ca58/attachment.bin>
More information about the Openmp-commits
mailing list