Skip to content

IRGen: Fix crash with empty-sized field in a class with resilient ancestry [5.3] #31351

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

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Apr 27, 2020

The problem was that HasObjCAncestry was not getting set if
HasResilientAncestry was true, and thus emitFieldOffsetGlobals() was
marking the field offset as const even though the Objective-C
runtime might slide it.

Fixes rdar://problem/57549481.

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 6158287b1abe4da2b727368c99dbb01ff3fe75b9

…estry

The problem was that HasObjCAncestry was not getting set if
HasResilientAncestry was true, and thus emitFieldOffsetGlobals() was
marking the field offset as const even though the Objective-C
runtime might slide it.

Fixes <rdar://problem/48031465>.
@slavapestov slavapestov force-pushed the empty-field-part-31337-5.3 branch from 6158287 to fd0cac5 Compare April 27, 2020 23:42
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 6158287b1abe4da2b727368c99dbb01ff3fe75b9

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 6158287b1abe4da2b727368c99dbb01ff3fe75b9

@slavapestov
Copy link
Contributor Author

@swift-ci Please test macOS

@slavapestov slavapestov merged commit a0a432e into swiftlang:release/5.3 Apr 28, 2020
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants