8000 Fix race condition during iteration through modules (#139283) (#139862) by JDevlieghere · Pull Request #10906 · swiftlang/llvm-project · GitHub
[go: up one dir, main page]

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

Merged

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

@JDevlieghere JDevlieghere merged commit 3d8aa19 into swift/release/6.2 Jun 27, 2025
3 checks passed
@JDevlieghere JDevlieghere deleted the cherrypick-swift/release/6.2-c72c0b298c13 branch June 27, 2025 16:31
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
0