[all-commits] [llvm/llvm-project] aec886: [OpenMP] avoid segv for a lock that has already ...

Larry Meadows via All-commits all-commits at lists.llvm.org
Wed Jun 25 12:09:08 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aec88679db5f5ac61616e0accc264008690a8ccc
      https://github.com/llvm/llvm-project/commit/aec88679db5f5ac61616e0accc264008690a8ccc
  Author: Larry Meadows <lmeadows at amd.com>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M openmp/runtime/src/kmp_lock.cpp
    A openmp/runtime/test/ompt/misc/lock_double_destroy.cpp

  Log Message:
  -----------
    [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list