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

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 14 15:46:41 PDT 2023


bulbazord added a comment.

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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148380/new/

https://reviews.llvm.org/D148380



More information about the lldb-commits mailing list