Skip to content

[5.10][Runtime] Fix leak of bridge objects in swift_generic_initWithTake #69978

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
Nov 29, 2023

Conversation

drexin
Copy link
Contributor

@drexin drexin commented Nov 18, 2023

5.10 cherry-pick of: #69977

  • Explanation: The initWithTakeTable accidentally referenced bridgeRetain instead of copyingInitWithTake, which caused a leak when an object containing a bridge reference was also not bitwise takable.
  • Scope: Layout strings only
  • Issue: rdar://118606044
  • Risk: Low, only affects layout strings, which is still experimental
  • Testing: Added regression test for this issue
  • Reviewer: @mikeash

@drexin drexin added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.10 labels Nov 18, 2023
@drexin drexin requested a review from a team as a code owner November 18, 2023 20:27
@drexin
Copy link
Contributor Author

drexin commented Nov 18, 2023

@swift-ci test

rdar://118606044

The initWithTakeTable accidentally referenced bridgeRetain instead of copyingInitWithTake, which caused a leak when an object containing a bridge reference was also not bitwise takable.
@drexin drexin force-pushed the wip-118606044-5.10 branch from e57be15 to 0c1e25c Compare November 19, 2023 16:55
@drexin
Copy link
Contributor Author

drexin commented Nov 19, 2023

@swift-ci test

1 similar comment
@drexin
Copy link
Contributor Author

drexin commented Nov 27, 2023

@swift-ci test

@drexin drexin requested a review from tbkka November 29, 2023 01:01
@drexin drexin merged commit feb97aa into swiftlang:release/5.10 Nov 29, 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 swift 5.10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants