Skip to content

[4.0] SILCombine: fix propagation of existential self into witness method call #12234

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 3, 2017

Conversation

eeckstein
Copy link
Contributor

Explanation: This fixes a miscompile when a mutating method call is called for a concrete struct-type. In some cases the method call did not modify the correct self value.

Scope of Issue: I'm wondering why this problem was not noticed earlier. It's definitely a severe bug.

Risk: Low. The fix adds a bail-out condition for exactly that case.

Reviewed By: Roman

Testing: There is a regression test for it

Radar: rdar://problem/34753633

In case of a mutating method call we replaced the self argument with the source of a copy_addr. This let the call modify the wrong self value.

rdar://problem/34753633
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit 51173d9 into swiftlang:swift-4.0-branch Oct 3, 2017
@eeckstein eeckstein deleted the fix-silcombine-4.0 branch October 3, 2017 01:55
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.

1 participant