[Lldb-commits] [PATCH] D148380: [lldb] Lock accesses to PathMappingLists's internals

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 14 15:50:42 PDT 2023

JDevlieghere added a comment.

In D148380#4270085 <https://reviews.llvm.org/D148380#4270085>, @bulbazord wrote:

> In D148380#4269876 <https://reviews.llvm.org/D148380#4269876>, @bulbazord wrote:
>> In D148380#4269862 <https://reviews.llvm.org/D148380#4269862>, @JDevlieghere wrote:
>>> Does this actually have to be a //recursive// mutex?
>> Good point, I don't think it does. I'll update this.
> Scratch that -- It unfortunately does need to be a recursive mutex. `PathMappingList` has a callback that may try to perform another operation on the list itself. This happens if you try to use `target modules search-paths add` -- We append to the list, the specified callback tries to read the size of the list. With a std::mutex we deadlock.

I see, and I assume it doesn't make sense to unlock the mutex before the callback?

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list