Skip to content

Return copy of path #144

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
Dec 14, 2015
Merged

Conversation

kovpas
Copy link
Contributor

@kovpas kovpas commented Dec 14, 2015

I'm not 100% sure about this one, primarily because it doesn't crash on OS X, however this fixes this crash on linux for me

Also, looking at the line above (return within #if TARGET_IPHONE_SIMULATOR) I see that it actually creates and returns a new copy of a string - just what method's name says.

parkera added a commit that referenced this pull request Dec 14, 2015
@parkera parkera merged commit fbd3466 into swiftlang:master Dec 14, 2015
@parkera
Copy link
Contributor

parkera commented Dec 14, 2015

This looks correct to me. The reason we get away with it on OS X is that the CFSTR() constant means the string cannot be overreleased. We don't have the same protections on Linux for various reasons.

@kovpas kovpas deleted the fix_cfutilities_crash branch December 19, 2015 16:00
atrick pushed a commit to atrick/swift-corelibs-foundation that referenced this pull request Jan 12, 2021
Pass in MessageRegistry instead of using a singleton
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