Skip to content

add requiresReabstraction flag / check(s) to RValueEmission #5405

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
Oct 24, 2016

Conversation

shajrawi
Copy link

radar rdar://problem/28695190

This PR resolves a problem wherein an RValue that didn't need reabstraction goes through the slow reabstraction path with +0 to the retain count - causing a crash upon release of the value.

With this PR we avoid the unnecessary reabstractions + make sure the value is retained.

@shajrawi
Copy link
Author

@rjmccall Can you please review?

@shajrawi
Copy link
Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor

Hi Joe, can you please add a SILGen test?

@slavapestov slavapestov self-assigned this Oct 24, 2016
@shajrawi
Copy link
Author

@slavapestov Unfortunately, We can't reproduce this issue / go into this code-path in Master (with any known code pattern), other modifications by @rjmccall hid this bug, the test would only work on the 3.0 branch - we actually need to cherry-pick this to 3.0

@rjmccall
Copy link
Contributor

Yes, this looks good to me.

@shajrawi shajrawi merged commit bd49107 into swiftlang:master Oct 24, 2016
@shajrawi shajrawi deleted the contexts_reabstraction branch October 24, 2016 21:49
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