Skip to content

IRGen: Properly adjust the closure type of a partial_apply of an objc_method #73791

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

aschwaighofer
Copy link
Contributor

It needs to match with the (large loadable) lowered closure type in the rest of the program: Large types in the signature need to be passed indirectly.

rdar://127367321

@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer
Copy link
Contributor Author

Hacks on top of hacks on top of hacks ...

…_method

It needs to match with the (large loadable) lowered closure type in the rest of
the program: Large types in the signature need to be passed indirectly.

rdar://127367321
@aschwaighofer aschwaighofer force-pushed the irgen_loadable_by_address_objc_method_closures branch from b99b6d8 to d89bf28 Compare May 22, 2024 16:39
@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer aschwaighofer merged commit 69b635a into swiftlang:main May 23, 2024
5 checks passed
aschwaighofer added a commit to aschwaighofer/swift that referenced this pull request May 23, 2024
…n objc_method

It needs to match with the (large loadable) lowered closure type in the
rest of the program: Large types in the signature need to be passed
indirectly.

A failure to do so results in mis-matched ptr auth descriminators and a
crash at runtime on arm64e.

Scope: Should only affect programs that form closures of objective c
methods involving large types

Risk: Low for other code, medium for programs involving such closures

Testing: A regression test was added

rdar://127367321

Original PR: swiftlang#73791

(cherry picked from commit 69b635a)
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.

1 participant