Skip to content

[6.1 🍒][Dependency Scanning] Synchronize on updating Swift dependency lookup results in-parallel #78868

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
merged 1 commit into from
Jan 24, 2025

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Jan 23, 2025

Cherry-pick of #78856

Description: When querying multiple Swift module dependencies in-parallel, multiple queries may be updating the hash map data structure where query results are recorded. This is not thread-safe and may cause a re-hashing of the hash map while other threads are accessing it. This change establishes the update of this hash map to be done in a critical section guarded by a lock.

Risk: Low, this change adds a synchronization mechanism to establish a critical section in the parallel section of the scan, without otherwise changing functionality.
Reviewed by: @cachemeifyoucan
• Original PR: #78856
• Radar: rdar://142978967

… results in-parallel

Resolves rdar://142978967
@artemcm artemcm requested a review from nkcsgexi January 23, 2025 22:22
@artemcm artemcm requested a review from a team as a code owner January 23, 2025 22:22
@artemcm artemcm added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.1 labels Jan 23, 2025
@artemcm
Copy link
Contributor Author

artemcm commented Jan 23, 2025

@swift-ci test

@artemcm artemcm merged commit bba7a23 into swiftlang:release/6.1 Jan 24, 2025
5 checks passed
@artemcm artemcm deleted the 61_FixRaceOnSwiftDepLookup branch January 27, 2025 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants