julia
b0b9fcf5 - Fix exception stack lowering in finally handlers (#36480)

Commit
5 years ago
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 16ba0dd6ee1b9d3fb5e9408be60af8e4b80dda93)
Author
Committer
Parents
Loading