Skip to content

[6.2][concurrency] Fix an off by one error in generic handling in local capture checking code. #81220

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
May 1, 2025

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Apr 30, 2025

Explanation: This is a patch originally by @DougGregor that eliminates an off by one error when we are performing checking of metatypes. The result is that we break memory safety by accessing a generic parameter that does not exist resulting in undefined behavior. My contribution here is just shepherding and creating the test case.

Scope: Eliminates an off by one error.

Resolves: rdar://150351351

Main PR: #81193

Risk: Low. This just fixes an off by one error.

Testing: Added compiler tests

Reviewer: @gottesmm

…pture checking code.

Otherwise, we break memory safety by accessing a generic parameter that does not
exist resulting in undefined behavior.

rdar://150351351
(cherry picked from commit fb3c710)
@gottesmm gottesmm requested a review from a team as a code owner April 30, 2025 22:27
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm
Copy link
Contributor Author

gottesmm commented May 1, 2025

@swift-ci test windows platform

@gottesmm gottesmm merged commit dec719d into swiftlang:release/6.2 May 1, 2025
5 checks passed
@gottesmm gottesmm deleted the release/6.2-150351351 branch May 1, 2025 21:01
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