Skip to content

[RemoteMirror] Fix potential uninitialized data access in convertChild. #33642

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

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented Aug 26, 2020

The else branch of the type checking code just does assert(false). When asserts are off, the code will fall through and access the uninitialized FieldInfo variable. Instead, return something sensible for this error case.

The else branch of the type checking code just does assert(false). When asserts are off, the code will fall through and access the uninitialized FieldInfo variable. Instead, return something sensible for this error case.
@mikeash mikeash requested a review from tbkka August 26, 2020 15:47
@mikeash
Copy link
Contributor Author

mikeash commented Aug 26, 2020

@swift-ci please test

@mikeash
Copy link
Contributor Author

mikeash commented Aug 26, 2020

@swift-ci please test windows platform

Copy link
Contributor

@tbkka tbkka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I wonder how many similar bugs we have.

@mikeash mikeash merged commit c059fc2 into swiftlang:master Aug 26, 2020
@mikeash
Copy link
Contributor Author

mikeash commented Aug 26, 2020

Approximately 1,200, I'd say. Now that I've fixed one, approximately 1,237.

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