llvm-project
c78e65cc - [lldb][plugin] Use counter directly for number of readers (#139252)

Commit
230 days ago
[lldb][plugin] Use counter directly for number of readers (#139252) Here we were initializing & locking a shared_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). Switch to counter to more simply keep track of number of readers and simply lock/unlock rather than utilizing reader mutex to verify last freed (and so requiring this matching thread init/destroy behavior).
Author
Parents
Loading