Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb] Tighten lock in Language::ForEach
It is easy to accidentally introduce a deadlock by having the callback passed to Language::ForEach also attempt to acquire the same lock. It is easy enough to disallow the callback from calling anything in Language directly, but it may happen through a series of other function/method calls. The solution I am proposing is to tighten the lock in Language::ForEach so that it is only held as we gather the currently loaded language plugins. We store them in a vector and then iterate through them with the callback so that the callback can't introduce a deadlock. Differential Revision: https://reviews.llvm.org/D109013
- Loading branch information