Skip to content

Fix race condition during iteration through modules (#139283) (#139862) #10906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: swift/release/6.2
Choose a base branch
from

Conversation

JDevlieghere
Copy link

Use the locking iterator to ensure module don't change during iteration.

(cherry picked from commit c72c0b2)

…vm#139862)

Use the locking iterator to ensure module don't change during iteration.

(cherry picked from commit c72c0b2)
@JDevlieghere JDevlieghere requested a review from a team as a code owner June 26, 2025 23:02
@JDevlieghere
Copy link
Author

@swift-ci test

…m#145991)

c72c0b2 fixed a race condition in Target::GetExecutableModule. The
patch originally added the lock_guard but I suggested using the locking
ModuleList::Modules() helper instead. That didn't consider that the
fallback would still access the ModuleList without holding the lock.
This patch fixes the remaining issue.

(cherry picked from commit 76f3cc9)
@JDevlieghere
Copy link
Author

@swift-ci test

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.

3 participants