llvm-project
aec88679 - [OpenMP] avoid segv for a lock that has already been destroyed (#145625)

Commit
166 days ago
[OpenMP] avoid segv for a lock that has already been destroyed (#145625) This can happen in static destructors when called after the runtime is already shutdown (e.g., by ompt_finalize_tool). Even though it is technically an error to call omp_destroy_lock after shutdown, the application doesn't necessarily know that omp_destroy_lock was already called. This is safe becaues all indirect locks are destoryed in __kmp_cleanup_indirect_user_locks so the return value will always be valid or a nullptr, not garbage.
Author
Parents
Loading