Skip to content

Fix out-of-bounds when providing fixits for the @available attribute. #64734

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 5 commits into from
Mar 31, 2023
Merged

Fix out-of-bounds when providing fixits for the @available attribute. #64734

merged 5 commits into from
Mar 31, 2023

Conversation

tristanlabelle
Copy link
Contributor

Fixes an out-of-bounds iterator access when providing fixits for the @available attribute.

None of the code paths in updateLabelsForArg should execute once we've reached the end of the argumentLabelIDs vector, but not all cases tested for this.

Fixes #64694

@compnerd
Copy link
Member

Please add a test case for this that triggered the failure case.

@compnerd
Copy link
Member

@swift-ci please test

@compnerd
Copy link
Member

@swift-ci please test macOS platform

@tristanlabelle
Copy link
Contributor Author

My bad, pushed a fix

@compnerd
Copy link
Member

@swift-ci please test

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

LGTM! @tshortli could you take a look as well please?

@xedin xedin requested a review from tshortli March 30, 2023 23:05
@xedin
Copy link
Contributor

xedin commented Mar 30, 2023

@swift-ci please test

Copy link
Contributor

@tshortli tshortli left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the fix!

@xedin
Copy link
Contributor

xedin commented Mar 31, 2023

@swift-ci please clean test macOS platform

@xedin xedin merged commit f702272 into swiftlang:main Mar 31, 2023
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.

Semantic checking crashes on @available(renamed:) with varargs
4 participants