Skip to content

[6.3][SILOptimizer] Transfer nonisolated(nonsending) from the original t…#89693

Merged
xedin merged 1 commit into
swiftlang:release/6.3from
xedin:rdar-178397835-6.3
Jun 8, 2026
Merged

[6.3][SILOptimizer] Transfer nonisolated(nonsending) from the original t…#89693
xedin merged 1 commit into
swiftlang:release/6.3from
xedin:rdar-178397835-6.3

Conversation

@xedin

@xedin xedin commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

…o specialized/optimized SILFunction variant

  • Explanation:

    This is a narrow fix for nonisolated(nonsending) function and reabstraction thunks in particular. If the speciflized/optimized variant doesn't get the right isolation, OptimizeHopToExecutor pass can incorrectly remove a valid backward hop which results in a potential runtime crash if the call to nonisolated(nonsending) is followed by synchronous code that expects the original isolation.

  • Resolves: rdar://178397835

  • Main Branch PRs: This is a 6.3 specific fix that is not required for 6.4/main because there isolation is assigned on SILFunction{Type} construction.

  • Risk: Very Low. The change is very narrow and apply only to specializations of nonisolated(nonsending) declarations.

  • Reviewed By: N/A

  • Testing: Added new test-cases to the suite.

…o specialized/optimized SILFunction variant

This is a narrow fix for `nonisolated(nonsending)` function and reabstraction thunks in particular.
If the speciflized/optimized variant doesn't get the right isolation, `OptimizeHopToExecutor` pass
can incorrectly remove a valid backward hop which results in a potential runtime crash if the call to
`nonisolated(nonsending)` is followed by synchronous code that expects the original isolation.

Resolves: rdar://178397835
@xedin xedin requested a review from a team as a code owner June 4, 2026 18:13
@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.3 labels Jun 4, 2026
@xedin

xedin commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@xedin

xedin commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@swift-ci please test macOS platform

@xedin xedin merged commit 2e7a407 into swiftlang:release/6.3 Jun 8, 2026
6 checks passed
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 6.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants