clayborg added a comment.

In https://reviews.llvm.org/D41909#973299, @tberghammer wrote:

> Why do we need to lock the Module mutex in SymbolVendor::FindFunctions? I 
> think a better option would be to remove that lock and if it is needed then 
> lock it just for the calls where it necessary. The fact that SymbolVendor 
> locks a mutex inside a Module feels like a pretty bad layering violation for 
> me what can cause many other deadlocks so it would be nice to fix that 
> instead of hacking it around here.


Module + ObjectFile + SymbolVendor + SymbolFile all lock the module's mutex 
before doing anything that might be adding information to the Module. 
SymbolVendor::FindFunctions will lazily parse functions from the debug info and 
populate things inside the module, so the lock is required. You can't put 
individual locks on Module + ObjectFile + SymbolVendor + SymbolFile as it 
_will_ cause deadlocks.


https://reviews.llvm.org/D41909



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to