Skip to content
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

[6.1][PackageCMO] Fix serializability of a key path instruction #78850

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

elsh
Copy link
Contributor

@elsh elsh commented Jan 23, 2025

  • Explanation: Fixes incorrectly serializing a key path instruction that shouldn't be when Package CMO is enabled.
  • Scope: Modules with Package CMO enabled.
  • Risk: Low; one-line change that corrects serializability of a key path instruction
  • Testing: Added unit tests
  • Cherry-picked PR: PackageCMO: fix serializability check for keypath #78732
  • Reviewer: @eeckstein
  • Issue: rdar://142950306

@elsh elsh requested a review from a team as a code owner January 23, 2025 15:20
@elsh elsh added the 🍒 release cherry pick Flag: Release branch cherry picks label Jan 23, 2025
@elsh
Copy link
Contributor Author

elsh commented Jan 23, 2025

@swift-ci smoke test

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.

This is a safe fix.

When a keypath instruction was checked for serializability, its referenced function was
sometimes incorrectly deemed serializable when its referenced method had package or
public access level. This resulted in incorrectly serializing a function that dynamically
accesses a property on a generic type using key path. This PR fixes the issue by skipping
the access level check if the referenced function is determined to be un-serializable.

Resolves rdar://142950306
@elsh elsh force-pushed the elsh/rel/pcmo-fix-keypath branch from ad3ca24 to dc6a4bf Compare January 24, 2025 16:16
@elsh
Copy link
Contributor Author

elsh commented Jan 24, 2025

@swift-ci test

@elsh elsh merged commit e108415 into release/6.1 Jan 25, 2025
5 checks passed
@elsh elsh deleted the elsh/rel/pcmo-fix-keypath branch January 25, 2025 15:26
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