Skip to content

[5.0] Test that newer libobjcs let the Swift runtime set up a class's layout #21970

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

Conversation

jrose-apple
Copy link
Contributor

  • Explanation: When a Swift class is referenced from Objective-C first, new versions of the Objective-C runtime will give the Swift runtime a chance to lay out that class properly. This is important for resilience, since up until now Objective-C isn't used to the size of a class changing based on anything other than a superclass's size changing.

    This commit is just a test; the actual implementation went in months ago, but didn't have a libobjc we could test against at the time.

  • Scope: Most interesting behavior is only tested on unreleased Apple OSs, but it's still testing class layout on released OSs.

  • Issue: rdar://problem/45718008

  • Risk: None. Test change only.

  • Testing: Tested on both old and new 64-bit macOS systems, old and new 64-bit iOS simulators, an old 32-bit iOS simulator, and a new 32-bit watchOS simulator.

  • Reviewed by: @slavapestov, @mikeash

swiftlang#21942)

Specifically, when the class is referenced from Objective-C first,
before being referenced from Swift in any way. This is important for
resilience, since up until now Objective-C isn't used to the size of a
class changing based on anything other than a superclass's size
changing.

This is basically the test that would have gone with 9024768 had
there been a build of libobjc to test it with.

rdar://problem/45718008
(cherry picked from commit 7629253)
@jrose-apple jrose-apple requested a review from a team as a code owner January 18, 2019 01:44
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

rdar://problem/47389594
(cherry picked from commit 73fba19)
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 36f17b9

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 36f17b9

Copy link
Contributor

@mikeash mikeash left a comment

Choose a reason for hiding this comment

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

Ouch.

@AnnaZaks AnnaZaks merged commit ca8240a into swiftlang:swift-5.0-branch Jan 19, 2019
@jrose-apple jrose-apple deleted the 5.0-layout-is-french-for-exit branch January 22, 2019 17:16
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.

4 participants