Skip to content

Conversation

hamishknight
Copy link
Contributor

6.2 cherry-pick of #82770

  • Explanation: Fixes a use-after-free that could occur with an invalid pack expansion
  • Scope: Affects invalid uses of pack expansions
  • Issue: rdar://154954995
  • Risk: Low, only affects invalid code, and any previous type variable escape here would have almost certainly resulted in a use-after-free
  • Testing: Added tests to test suite
  • Reviewer: Pavel Yaskevich

`TypeSimplifier` may not eliminate type variables from e.g the
pattern types of pattern expansion types since they can remain
unresolved due to e.g having a placeholder count type. Make sure we
eliminate any remaining type variables along with the placeholders.
There's probably a more principled fix here, but this is a quick and
low risk fix we can hopefully take for 6.2.

rdar://154954995
@hamishknight hamishknight requested a review from bnbarham July 3, 2025 17:04
@hamishknight hamishknight requested a review from a team as a code owner July 3, 2025 17:04
@hamishknight hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Jul 3, 2025
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit ee5f4df into swiftlang:release/6.2 Jul 4, 2025
5 checks passed
@hamishknight hamishknight deleted the simple-fix-6.2 branch July 4, 2025 09:58
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.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants