Skip to content

[Runtime] Fix swift_weakTakeStrong(). #65193

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
Apr 15, 2023

Conversation

al45tair
Copy link
Contributor

It turns out that when taking the last weak reference for an object that has been deallocated, we might have returned a non-null pointer when we shouldn't have. Which is exciting.

rdar://106375185

@al45tair al45tair requested a review from mikeash April 14, 2023 17:42
@al45tair al45tair requested a review from a team as a code owner April 14, 2023 17:42
@al45tair
Copy link
Contributor Author

@swift-ci Please test

@al45tair
Copy link
Contributor Author

This is a cherry pick of #65192, which fixes rather a serious bug with weak references. The fix is simple, thankfully.

It turns out that when taking the last weak reference for an object that
has been deallocated, we might have returned a non-null pointer when we
shouldn't have.  Which is exciting.

rdar://106375185
@al45tair al45tair force-pushed the eng/PR-106375185-5.9 branch from 381f397 to a6d2ed6 Compare April 14, 2023 18:17
@al45tair
Copy link
Contributor Author

@swift-ci Please test

@al45tair al45tair merged commit 148f91c into swiftlang:release/5.9 Apr 15, 2023
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants