Skip to content

Actually slice things in _StringGutsSlice (5.7 cherry pick) #58968

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 1 commit into from
May 19, 2022

Conversation

Catfish-Man
Copy link
Contributor

@Catfish-Man Catfish-Man commented May 18, 2022

Cherry pick of #58948

During the ICU removal we accidentally dropped checking the bounds on Substrings in some cases, particularly hashing. This resulted in Substrings that compared equal but hashed differently, causing crashes when using them as keys or putting them in sets. This change fixes that by slicing the temporary String we use to get access to the NFC data, and adds tests to make sure it stays fixed.

rdar://87371813
#59388
#59066

@Catfish-Man Catfish-Man requested a review from a team as a code owner May 18, 2022 21:03
@Catfish-Man
Copy link
Contributor Author

@swift-ci please test and merge

@swift-ci swift-ci merged commit 4ae6b92 into swiftlang:release/5.7 May 19, 2022
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.

3 participants