Skip to content

[Runtime] Rename swift_unknown* functions to swift_unknownObject*. #18737

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

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented Aug 15, 2018

These functions don't accept local variable heap memory, although the names make it sound like they work on anything. When you try, they mistakenly identify such things as ObjC objects, call through to the equivalent objc_* function, and crash confusingly. This adds Object to the name of each one to make it more clear what they accept.

rdar://problem/37285743

@mikeash mikeash requested a review from gottesmm August 15, 2018 21:19
@mikeash
Copy link
Contributor Author

mikeash commented Aug 15, 2018

@swift-ci please test

Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

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

LGTM

These functions don't accept local variable heap memory, although the names make it sound like they work on anything. When you try, they mistakenly identify such things as ObjC objects, call through to the equivalent objc_* function, and crash confusingly. This adds Object to the name of each one to make it more clear what they accept.

rdar://problem/37285743
@mikeash mikeash force-pushed the change-swift_unknownX-to-swift_unknownObjectX branch from 659cfdc to 46309d9 Compare August 15, 2018 21:48
@mikeash
Copy link
Contributor Author

mikeash commented Aug 15, 2018

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 659cfdc7e5aac9ae4d354ee3f27eb7a19a0f5474

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 659cfdc7e5aac9ae4d354ee3f27eb7a19a0f5474

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 659cfdc7e5aac9ae4d354ee3f27eb7a19a0f5474

@mikeash
Copy link
Contributor Author

mikeash commented Aug 16, 2018

@swift-ci please test linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 46309d9

@mikeash
Copy link
Contributor Author

mikeash commented Aug 16, 2018

@swift-ci please test linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 46309d9

@mikeash
Copy link
Contributor Author

mikeash commented Aug 17, 2018

@swift-ci please test linux

@mikeash mikeash merged commit ba25b62 into swiftlang:master Aug 17, 2018
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