Skip to content

SR-10689: Fix bugs of DataProtocol's firstRange(of:in:)/lastRange(of:in:). #28639

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
Aug 7, 2020

Conversation

YOCKOW
Copy link
Member

@YOCKOW YOCKOW commented Dec 8, 2019

DataProtocol's firstRange(of:in:) and lastRange(of:in:) return a wrong value or crash under some conditions because they handle indices incorrectly.

Resolves SR-10689.


Note: This PR is a counterpart of swiftlang/swift-corelibs-foundation#2499 .

@theblixguy theblixguy requested a review from phausler December 8, 2019 13:55
@DougGregor
Copy link
Member

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Dec 9, 2019

Build failed
Swift Test OS X Platform
Git Sha - 0a5e93e0e4779ca9c95601542abcf8a57ca75f24

@YOCKOW
Copy link
Member Author

YOCKOW commented Dec 10, 2019

I'm sorry. The failure is caused by my rudimentary mistake. I'll fix it.

@YOCKOW YOCKOW force-pushed the sr-10689-cherry-pick branch from 0a5e93e to 421af22 Compare December 16, 2019 02:45
@YOCKOW
Copy link
Member Author

YOCKOW commented Dec 16, 2019

I am sorry for the late fix. Now it is rebased and would pass tests.

@CodaFi
Copy link
Contributor

CodaFi commented Apr 15, 2020

@YOCKOW
Copy link
Member Author

YOCKOW commented Aug 3, 2020

All tests of this PR and scf#2499 have passed.
I believe these are not stale.

Copy link
Contributor

@phausler phausler 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 to me

@YOCKOW
Copy link
Member Author

YOCKOW commented Aug 7, 2020

@phausler
Thank you very much.
It would be ready to be merged.

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.

6 participants