================ @@ -1608,9 +1612,28 @@ void Target::SetExecutableModule(ModuleSP &executable_sp, if (image_module_sp) { added_modules.AppendIfNeeded(image_module_sp, false); ObjectFile *objfile = image_module_sp->GetObjectFile(); - if (objfile) + if (objfile) { + std::lock_guard<std::mutex> guard(dependent_files_mutex); objfile->GetDependentModules(dependent_files); ---------------- JDevlieghere wrote:
Yeah fair enough. Even the Mach-O one is doing some filesystem operations that really shouldn't be happening while holding the lock. I don't think we need to make every FileSpecList thread safe, and passing an optional `mutex*` was messy, so I went with the local copy as Jason suggested. https://github.com/llvm/llvm-project/pull/114507 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits