This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add missing mutex guards to TargetList::CreateTarget
ClosedPublic

Authored by teemperor on May 24 2021, 6:45 AM.

Details

Summary

TestMultipleTargets is randomly failing on the bots. The reason for that is that the
test is calling SBDebugger::CreateTarget from multiple threads.
TargetList::CreateTarget is curiously missing the guard that all of its
other member functions have, so all the threads in the test end up changing the
internal TargetList state at the same time and end up corrupting it.

Diff Detail

Event Timeline

teemperor created this revision.May 24 2021, 6:45 AM
teemperor requested review of this revision.May 24 2021, 6:45 AM
vsk accepted this revision as: vsk.May 24 2021, 10:09 AM
vsk added a subscriber: vsk.

Thanks, lgtm.

This revision is now accepted and ready to land.May 24 2021, 10:09 AM
This revision was landed with ongoing or failed builds.May 24 2021, 10:50 AM
This revision was automatically updated to reflect the committed changes.