[all-commits] [llvm/llvm-project] c5ffbd: [lldb][plugin] Clear in same thread as set

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Fri May 9 05:23:22 PDT 2025


  Branch: refs/heads/users/jpienaar/unlocked_shared_lock_other_thread
  Home:   https://github.com/llvm/llvm-project
  Commit: c5ffbd84f8b68bae2112e8cec68803cefe571a72
      https://github.com/llvm/llvm-project/commit/c5ffbd84f8b68bae2112e8cec68803cefe571a72
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2025-05-09 (Fri, 09 May 2025)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp

  Log Message:
  -----------
  [lldb][plugin] Clear in same thread as set

Here we were initializing & locking a mutex in a thread, while releasing it in the parent which may/often turned out to be a different thread (shared_mutex::unlock_shared is undefined behavior if called from a thread that doesn't hold the lock).

I'm not quite sure what the expectation is here as the variable is never used, so instead I've just reset in same thread as which it was set to ensure its freed in thread holding lock.



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