[all-commits] [llvm/llvm-project] ba51da: [lldb] Add missing mutex guards to TargetList::Cre...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Mon May 24 10:50:32 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ba51da820e4dc73153009f8a621ef49711294ae1
      https://github.com/llvm/llvm-project/commit/ba51da820e4dc73153009f8a621ef49711294ae1
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2021-05-24 (Mon, 24 May 2021)

  Changed paths:
    M lldb/source/Target/TargetList.cpp

  Log Message:
  -----------
  [lldb] Add missing mutex guards to TargetList::CreateTarget

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.

Reviewed By: vsk, JDevlieghere

Differential Revision: https://reviews.llvm.org/D103020




More information about the All-commits mailing list