Skip to content

IRGen: Fix witness-table accessors for conditional conformances #15397

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

Conversation

aschwaighofer
Copy link
Contributor

@aschwaighofer aschwaighofer commented Mar 21, 2018

When there is a conditional conformance the witness table accessor is passed one argument in memory. Using ReadNone like we used to do is not correct.

SR-7228
rdar://38624842

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please smoke test and merge

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please smoke test and merge

@slavapestov
Copy link
Contributor

A more detailed commit message would be nice in the future. Remember outside users don’t have access to radar

@aschwaighofer
Copy link
Contributor Author

I can hopefully still smuggle in a more detailed comment in the merge commit message.

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please smoke test

@aschwaighofer aschwaighofer merged commit e4679cb into swiftlang:master Mar 21, 2018
@aschwaighofer
Copy link
Contributor Author

... except the text above does not end up in the merge commit message

aschwaighofer added a commit to aschwaighofer/swift that referenced this pull request Mar 22, 2018
Cherry-pick of swiftlang#15397.

The conditional conformance's witness table accessor function takes as
arugment an array of conditional conformances in memory. But we used to
mark the accessor function with LLVM's readnone attribute. In optimized
mode this would cause the store to this array to be removed and crashes
ensued.

rdar://38624842
SR-7228
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.

2 participants