[Lldb-commits] [PATCH] D86388: Fix use-after-free in ThreadPlan, and add test.

Nicholas Allegra via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 26 18:08:34 PDT 2020


comex added a comment.

Disabling the thread list while the target is running sounds like a pretty complex change.  For example, what should happen if a Python script calls `lldb.process.GetThreadAtIndex(n)` while the target is running, which currently works?

And is it really the right direction to be moving in?  Long-term, wouldn't it be better if user-facing commands like `thread list` worked while the target is running?  Or extra-long-term, one of the ideas on the LLDB projects page [1] is non-stop debugging (like GDB supports), where one thread is paused and can be inspected while other threads are still running.  That would require a model where threads are created and destroyed on the fly, without a rigid sequence of "resume and thread list goes away; stop and thread list comes back".

FWIW, this bug causes intermittent crashes whenever I try to debug xnu, so I'd like to get it fixed relatively quickly if possible.  Even just calculating ShouldReportRun earlier, while certainly doable, would be a considerably more complex change than this.

[1] https://lldb.llvm.org/status/projects.html#non-stop-debugging


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86388/new/

https://reviews.llvm.org/D86388



More information about the lldb-commits mailing list