Skip to content

[5.5] Fix asserts and crashes caused by skipping function bodies or allowing errors #37750

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 6 commits into from
Jun 3, 2021

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Jun 2, 2021

Cherry-pick #37701


Fixes various crashes exposed by the stress tester when either skipping function bodies or allowing errors.

bnbarham added 6 commits June 3, 2021 08:39
When allowing errors any attribute could be on any decl, so don't verify
whether an attribute can appear on a decl. Note that these attributes
aren't serialized anyway since they'll be set to invalid during
typechecking and hence skipped.
Most invalid attributes are skipped from serialization entirely, but
custom attributes don't have their invalid bit set - the particular
custom attribute (eg. a property wrapper) is requested when needed and
skipped if invalid. Those checks can't set the invalid bit since the
attribute could be a different custom attribute (eg. a result builder).
Note that deserialization already handles this case when recovery is
enabled.
@bnbarham bnbarham added the r5.5 label Jun 2, 2021
@bnbarham bnbarham requested a review from akyrtzi June 2, 2021 22:46
@bnbarham bnbarham requested a review from a team as a code owner June 2, 2021 22:46
@bnbarham
Copy link
Contributor Author

bnbarham commented Jun 2, 2021

@swift-ci please test

@bnbarham bnbarham merged commit 061f1ae into swiftlang:release/5.5 Jun 3, 2021
@bnbarham bnbarham deleted the 5.5-cherry-stress-crashes branch June 3, 2021 23:35
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants