Skip to content

[5.10] [Profiler] Remove an assertion #70120

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

Merged

Conversation

hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Nov 30, 2023

  • Explanation: Due to the recent change to how we simplify counters (rdar://118185163), we can now end up hitting this assertion for certain do-catch statements. The counter has always been wrong here, and previously would have underflowed at runtime (rdar://100470244). This issue has been properly fixed on main, but we haven't cherry-picked that fix to 5.10 since it requires a bunch of other changes. For now, just remove the assertion to maintain the previous behavior.
  • Scope: Affects code coverage for do-catch statements
  • Issue: rdar://118896974
  • Risk: Low, this just removes an assertion
  • Testing: Added test to test suite
  • Reviewer: Ben Barham

Resolves #70072

Due to the recent change to how we simplify
counters (rdar://118185163), we can now end up
hitting this assertion for certain do-catch
statements. The counter has always been wrong
here, and previously would have underflowed at
runtime (rdar://100470244). This issue has been
properly fixed on main, but we haven't
cherry-picked that fix to 5.10 since it requires a
bunch of other changes. For now, just remove the
assertion to maintain the previous behavior.

rdar://118896974
@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 13:05
@hamishknight hamishknight removed the 🍒 release cherry pick Flag: Release branch cherry picks label Nov 30, 2023
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

@hamishknight
Copy link
Contributor Author

Source compat failure is a UPASS

@hamishknight hamishknight merged commit e088663 into swiftlang:release/5.10 Nov 30, 2023
@hamishknight hamishknight deleted the remove-assert-5.10 branch November 30, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Source compatibility suite] [5.10] Assertion failed: (!Counter.isZero() && "Cannot create a negative counter")
2 participants