Skip to content

[Serialization] Fix incorrect counting of value witnesses #9800

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 2 commits into from
May 20, 2017

Conversation

jrose-apple
Copy link
Contributor

If any of the witnesses were missing (because the requirement was optional or marked unavailable), we would forget to count it, which led to us dropping or even misinterpreting further witness records. This led to strange crashes down the line when the type checker would expect witness entries to be present when they weren't.

(Actually ProtocolConformance::dump when 'this' is a
NormalProtocolConformance.)

No functionality change.
If any of the witnesses were missing (because the requirement was
optional or marked unavailable), we would forget to count it,
which led to us dropping or even misinterpreting further witness
records. This led to strange crashes down the line when the type
checker would expect witness entries to be present when they weren't.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor Author

I'm kind of amazed we haven't hit this before. We've been serializing absent witnesses for a while.

@jrose-apple jrose-apple requested a review from DougGregor May 20, 2017 01:27
@jrose-apple
Copy link
Contributor Author

jrose-apple commented May 20, 2017

Eagerly landing, but would still like a review for the 4.0 branch at #9801.

@jrose-apple jrose-apple merged commit 96a1ab7 into swiftlang:master May 20, 2017
@jrose-apple jrose-apple deleted the null-does-not-mean-absent branch May 20, 2017 01:36
jrose-apple added a commit to jrose-apple/swift that referenced this pull request May 20, 2017
…-absent

[Serialization] Fix incorrect counting of value witnesses
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