[all-commits] [llvm/llvm-project] 139e2a: [lldb] Remove orphaned modules in a loop

Raphael Isemann via All-commits all-commits at lists.llvm.org
Mon Jul 20 01:48:35 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 139e2a3f7b279ca886c71b676f983ea314c36568
      https://github.com/llvm/llvm-project/commit/139e2a3f7b279ca886c71b676f983ea314c36568
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2020-07-20 (Mon, 20 Jul 2020)

  Changed paths:
    M lldb/source/Core/ModuleList.cpp

  Log Message:
  -----------
  [lldb] Remove orphaned modules in a loop

Summary:

When modules reference each other (which happens for example with the different
modules LLDB loads when debugging -gmodules-compiled binaries), just iterating
over the module list once isn't good enough to find all orphans. Any removed
modules in the module list will also clear up the shared pointers they hold to
other modules, so after any module was removed from the list, LLDB should
iterate again and check if any additional modules can no be safely deleted.

This is currently causing that many gmodules tests are not cleaning up all
allocated modules which causes cleanup asserts to fail (right now these asserts
just mark the test as unsupported, but after D83865 the tests will start
failing).

Reviewers: aprantl, clayborg, JDevlieghere

Reviewed By: JDevlieghere

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




More information about the All-commits mailing list