[Openmp-commits] [openmp] 33da6bd - [OpenMP] Fixes for shared memory cleanup when aborts occur

via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 10 13:16:49 PST 2020


Author: AndreyChurbanov
Date: 2020-11-11T00:16:23+03:00
New Revision: 33da6bd7f5031559fb366ed3c6524552007d6287

URL: https://github.com/llvm/llvm-project/commit/33da6bd7f5031559fb366ed3c6524552007d6287
DIFF: https://github.com/llvm/llvm-project/commit/33da6bd7f5031559fb366ed3c6524552007d6287.diff

LOG: [OpenMP] Fixes for shared memory cleanup when aborts occur

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

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

Added: 
    

Modified: 
    openmp/runtime/src/kmp_runtime.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp
index 71a55e82476d..6ff11db1da4d 100644
--- a/openmp/runtime/src/kmp_runtime.cpp
+++ b/openmp/runtime/src/kmp_runtime.cpp
@@ -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));


        


More information about the Openmp-commits mailing list