Skip to content

Fix _StringObject.init(object:...) #35243

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 5, 2021
Merged

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Dec 30, 2020

Add a missing fix_lifetime. This miscompiles with OSSA because
object is destroyed before bridgeObject is retained.

Reinterpreting a reference to a trivial type always requires a
fix_lifetime.

Add a missing fix_lifetime. This miscompiles with OSSA because
`object` is destroyed before `bridgeObject` is retained.

Reinterpreting a reference to a trivial type always requires a
fix_lifetime.
Copy link
Member

@milseman milseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@milseman
Copy link
Member

Also, I'd be open to any mechanism or builtin that can help with this, provided any abstractions are guaranteed to boil away at compile time.

@atrick
Copy link
Contributor Author

atrick commented Jan 1, 2021

fix_lifetime definitely is not the right tool, but it's all we have right now. We need a builtin that expresses dependence of some value on an object for some scope, possibly defaulting to method-scope for self.

@atrick
Copy link
Contributor Author

atrick commented Jan 4, 2021

@swift-ci test

@swift-ci
Copy link
Contributor

swift-ci commented Jan 4, 2021

Build failed
Swift Test Linux Platform
Git Sha - c4661b9

@atrick
Copy link
Contributor Author

atrick commented Jan 5, 2021

@swift-ci test linux platform

@atrick atrick merged commit 51163e6 into swiftlang:main Jan 5, 2021
@atrick atrick deleted the fix-stringinit branch January 5, 2021 04:44
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.

3 participants