-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix exception stack lowering in finally handlers (#36480)
When using `return` or `break` nested inside `finally` handlers, exception stack lowering failed to pop exceptions from the stack correctly: * For `return`, the exception stack was not popped at all. If done inside a loop this could eventually cause the runtime to run out of memory. * For `break`, the exception stack was popped too early, causing subtle inconsistency in intermediate finally handlers. Fix these issues by storing the current exception token stack with the current finally handler information and using it to pop the stack before jumping into the finally block. Fixes #34579 (cherry picked from commit 16ba0dd)
- Loading branch information
1 parent
b04654b
commit b0b9fcf
Showing
2 changed files
with
99 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters