Skip to content
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

[stdlib] Start preparing the standard library for strict concurrency checking #71290

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Jan 31, 2024

This patch marks some global variables in the standard library as nonisolated(unsafe) where appropriate with some justification on why marking them that way is _ok_. I've also gone ahead and marked the empty singletons as const and the hashing parameters as const. C/C++ won't put just a regular const in some read only memory, so I forced these special variables in constant relocatable memory instead (because they have pointers to metadata) which will cause a bad access when trying to write to these symbols.

With -strict-concurrency=complete, this cleans up most of the warnings we have in the standard library. The only other warning we get is with CommandLine.arguments which I'm hoping we can revive this PR #69981 to deprecate and eventually move to a safer interface for this API.

@Azoy Azoy requested review from ktoso and hborla January 31, 2024 23:09
@Azoy Azoy requested a review from a team as a code owner January 31, 2024 23:09
@Azoy
Copy link
Contributor Author

Azoy commented Jan 31, 2024

@swift-ci please test

@Azoy
Copy link
Contributor Author

Azoy commented May 7, 2024

@swift-ci please smoke test

@Azoy
Copy link
Contributor Author

Azoy commented May 8, 2024

@swift-ci please test

2 similar comments
@Azoy
Copy link
Contributor Author

Azoy commented May 15, 2024

@swift-ci please test

@Azoy
Copy link
Contributor Author

Azoy commented May 29, 2024

@swift-ci please test

@Azoy
Copy link
Contributor Author

Azoy commented Jun 4, 2024

@swift-ci please test Linux

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.

4 participants