Skip to content

[5.10] [Profiler] Fix handling of property wrapper backing inits #70118

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

hamishknight
Copy link
Contributor

5.10 cherry-pick of #70105

  • Explanation: Fixes a crash that could occur when generating coverage for an if/switch expression in a property initializer with a property wrapper that has arguments.
  • Scope: Affects code coverage
  • Issue: rdar://118939162
  • Risk: Low, the fix is straightforward, and excludes some duplicate coverage data
  • Testing: Added tests to test suite
  • Reviewer: Ben Barham

@hamishknight hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.10 labels Nov 30, 2023
@hamishknight hamishknight requested a review from a team as a code owner November 30, 2023 12:28
@hamishknight hamishknight force-pushed the range-against-the-machine-5.10 branch from 22e064b to 7464de2 Compare November 30, 2023 12:38
Previously we were walking into the
PropertyWrapperValuePlaceholderExpr when generating
coverage for a property wrapper backing initializer.
This meant that we were duplicating the coverage of
the initializer expression, and it could cause
crashes if a refined counter was introduced within
the top-most expression region, such as with a
throwing expression in a `try!`, or the use of
an `if` expression.

rdar://118939162
@hamishknight hamishknight force-pushed the range-against-the-machine-5.10 branch from 7464de2 to ea84175 Compare November 30, 2023 15:04
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit b9ec11b into swiftlang:release/5.10 Nov 30, 2023
@hamishknight hamishknight deleted the range-against-the-machine-5.10 branch November 30, 2023 20:00
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 5.10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants