Skip to content

Conversation

@felipepiovezan
Copy link

@felipepiovezan felipepiovezan commented Oct 20, 2025

When querying the old thread list (from a previous stop) for an already created thread, LLDB must not attempt to re-update the list.

rdar://162635997

…eadList

When querying the old thread list (from a previous stop) for an already
created thread, LLDB must not attempt to re-update the list.
@felipepiovezan
Copy link
Author

@swift-ci test

@jimingham
Copy link

jimingham commented Oct 20, 2025

Might be better to solve this by adding a ThreadList::Freeze that prevents all updates, and just do that when we copy the ThreadList to the old ThreadList in Process. I don't think we ever intend to update the old thread list, so we shouldn't have to prevent that on a case by case basis.

@felipepiovezan
Copy link
Author

Might be better to solve this by adding a ThreadList::Freeze that prevents all updates, and just do that when we copy the ThreadList to the old ThreadList in Process. I don't think we ever intend to update the old thread list, so we shouldn't have to prevent that on a case by case basis.

I think this kind of API adds complexity to the class (it's yet another thing to track internally: "am I frozen?"). IMO the problem here is that we don't use const semantics properly for ThreadList methods. There should be a FindThreadByID method that is const and does not have the "can_update" argument.

@felipepiovezan
Copy link
Author

We chatted offline about this, and yes, we need to prevent future misuses of this API. I'm going to merge this first though, as it is causing a lot of crashes.

@felipepiovezan felipepiovezan merged commit f6dd49f into swiftlang:stable/21.x Oct 21, 2025
3 checks passed
@felipepiovezan felipepiovezan deleted the felipe/fix_recursion branch October 21, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants