Skip to content

Conversation

@nkcsgexi
Copy link
Contributor

@nkcsgexi nkcsgexi commented Nov 9, 2025

For dynamic features defined from a header, we synthesize a pure Clang function to check whether the feature should be enabled at runtime. Swift modules don't have capability to deserialize this clang predicate function, leading to crasher as a result. This change fixes the crasher by hiding the synthesized function to be a module internal one.

rdar://164410957

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Nov 9, 2025

@swift-ci please smoke test

@nkcsgexi nkcsgexi force-pushed the serialization-dynamic-check branch from 48a7d5b to f14d56e Compare November 9, 2025 23:29
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Nov 9, 2025

@swift-ci please smoke test

1 similar comment
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Nov 9, 2025

@swift-ci please smoke test

@nkcsgexi nkcsgexi force-pushed the serialization-dynamic-check branch from f14d56e to 28a1476 Compare November 9, 2025 23:41
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Nov 9, 2025

@swift-ci please smoke test

@nkcsgexi nkcsgexi force-pushed the serialization-dynamic-check branch from 28a1476 to cf40ff5 Compare November 10, 2025 01:44
@nkcsgexi nkcsgexi requested a review from jckarter as a code owner November 10, 2025 01:44
@nkcsgexi nkcsgexi force-pushed the serialization-dynamic-check branch from cf40ff5 to b3246a4 Compare November 10, 2025 01:46
@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

@nkcsgexi nkcsgexi force-pushed the serialization-dynamic-check branch from b3246a4 to 9c2568f Compare November 10, 2025 01:56
@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

…ic availability checking as an API entry

For dynamic features defined from a header, we synthesize a pure Clang function to check whether the feature should
be enabled at runtime. Swift modules don't have capability to deserialize this clang predicate function, leading to
crasher as a result. This change fixes the crasher by hiding the synthesized function to be a module internal one.

rdar://164410957
@nkcsgexi nkcsgexi force-pushed the serialization-dynamic-check branch from 9c2568f to e31c1cc Compare November 10, 2025 17:28
@nkcsgexi nkcsgexi changed the title CustomAvailability: avoid exposing the synthesized function of dynamic availability checking as an API entry CustomAvailability: avoid exposing the synthesized function for dynamic availability checking as an API entry Nov 10, 2025
@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

@nkcsgexi nkcsgexi requested review from artemcm and xymus November 10, 2025 17:52
@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

@nkcsgexi nkcsgexi enabled auto-merge November 11, 2025 00:27
@nkcsgexi nkcsgexi merged commit bc9df74 into swiftlang:main Nov 11, 2025
3 checks passed
@nkcsgexi nkcsgexi deleted the serialization-dynamic-check branch November 11, 2025 02:34
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.

2 participants