Skip to content

IRGen: correct Twine handling #63635

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
Feb 14, 2023
Merged

IRGen: correct Twine handling #63635

merged 1 commit into from
Feb 14, 2023

Conversation

compnerd
Copy link
Member

Twine is an intermediate reference and should not be constructed to hold the value. An unowned string piece should be referenced by StringRef. This now provides storage for the name. We would previously see invalid memory usage due to the Twine being destroyed before the use in the CreateLoad invocation.

Twine is an intermediate reference and should not be constructed to hold the value.  An unowned string piece should be referenced by `StringRef`.  This now provides storage for the name.  We would previously see invalid memory usage due to the Twine being destroyed before the use in the `CreateLoad` invocation.
@compnerd
Copy link
Member Author

@swift-ci please test

Copy link
Contributor

@nate-chandler nate-chandler left a comment

Choose a reason for hiding this comment

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

Thank you!

@bnbarham
Copy link
Contributor

@swift-ci please test macOS platform

@bnbarham
Copy link
Contributor

@swift-ci please test Linux platform

@bnbarham
Copy link
Contributor

Both failures unrelated :(

@compnerd compnerd merged commit 520636c into main Feb 14, 2023
@compnerd compnerd deleted the compnerd/stack-corruption branch February 14, 2023 15:53
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