diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2016-01-22 19:16:14 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2016-01-22 19:16:14 +0000 |
commit | 3bd88d4c152152f6e9ab50fe4dcffba86e5f21c7 (patch) | |
tree | 7c820c1c43270c7259fa239bb61f4dd44987fdea | |
parent | 7b413c6c6363f52b7e5ccde1060f33637e06ff5a (diff) | |
download | bcm5719-llvm-3bd88d4c152152f6e9ab50fe4dcffba86e5f21c7.tar.gz bcm5719-llvm-3bd88d4c152152f6e9ab50fe4dcffba86e5f21c7.zip |
Add missing cleanup code for cached indirect lock pool.
This change fixes one issue reported at https://llvm.org/bugs/show_bug.cgi?id=26184
There was missing cleanup code for the cached indirect lock pool. The change
will fix the reported case where it tries to initialize a lock after runtime
cleanup/reinitialization, but it is still possible that the user program runs
into another problem because most test programs have a call to __kmpc_set_lock
after cleanup/reinitialization without calling __kmpc_init_lock causing a crash/hang.
llvm-svn: 258528
-rw-r--r-- | openmp/runtime/src/kmp_lock.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_lock.cpp b/openmp/runtime/src/kmp_lock.cpp index 6b8beef9c6a..205e5c98a3f 100644 --- a/openmp/runtime/src/kmp_lock.cpp +++ b/openmp/runtime/src/kmp_lock.cpp @@ -3578,6 +3578,7 @@ __kmp_cleanup_indirect_user_locks() __kmp_free(ll->lock); ll->lock = NULL; } + __kmp_indirect_lock_pool[k] = NULL; } // Clean up the remaining undestroyed locks. for (i = 0; i < __kmp_i_lock_table.next; i++) { |