Skip to content

🍒 Fix @objcImpl crash with async/sync overloads #66876

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
Jun 26, 2023

Conversation

beccadax
Copy link
Contributor

  • Explanation: The @_objcImplementation checker sometimes dereferenced a null pointer when it tried to check an async method in the header against a non-async method in the extension. Modify the code to tolerate this situation.
  • Radar (and possibly SR Issue): rdar://111064481
  • Scope: Early adopters of @_objcImplementation who are using it to implement methods with completion handlers.
  • Risk: Very low. The change simply makes the compiler handle nullptr correctly.
  • Testing: Includes unit tests.
  • Reviewed By: @tshortli and @xedin in Fix @objcImpl crash with async/sync overloads #66858.

The @objcImpl checker would accidentally dereference a null pointer when it tried to check if an async requirement could be satisfied by a non-async method. Fix that mistake.

Fixes rdar://111064481.
@beccadax beccadax requested a review from a team as a code owner June 23, 2023 02:15
@beccadax beccadax requested a review from nkcsgexi June 23, 2023 02:15
@beccadax
Copy link
Contributor Author

@swift-ci please test

@beccadax beccadax added the 🍒 release cherry pick Flag: Release branch cherry picks label Jun 23, 2023
@beccadax beccadax changed the title Fix @objcImpl crash with async/sync overloads 🍒 Fix @objcImpl crash with async/sync overloads Jun 23, 2023
Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this, Becca!

@beccadax beccadax merged commit f12dbd2 into swiftlang:release/5.9 Jun 26, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants