[Lldb-commits] [lldb] Convert ThreadPlanStack's mutex to a shared mutex. (PR #116438)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 15 12:59:37 PST 2024
https://github.com/JDevlieghere commented:
Mechanically this change looks good, plus I'm always happy to see another recursive mutex go.
One side-effect of this change is that previously, the ThreadPlanStack mutex was indirectly protecting some operations on ThreadPlans too. For example, `ThreadPlan::ClearThreadCache` isn't protected by a mutex, but `ThreadPlanStack::ClearThreadCache` used to be. Assuming the only way multiple threads would interact with this function is through the `ThreadPlanStack`, we now have a potential race because of the reader-lock, while previously this was indirectly protected by the unique lock. I don't know the ThreadPlans enough to determine if that's a problem or not.
https://github.com/llvm/llvm-project/pull/116438
More information about the lldb-commits
mailing list