https://github.com/JuliaLang/julia
Revision b0b9fcf5826ae4c986a1bbb0529403eb211fcb36 authored by Chris Foster on 01 July 2020, 02:20:06 UTC, committed by KristofferC on 08 July 2020, 12:49:35 UTC
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)
1 parent b04654b
Raw File
Tip revision: b0b9fcf5826ae4c986a1bbb0529403eb211fcb36 authored by Chris Foster on 01 July 2020, 02:20:06 UTC
Fix exception stack lowering in finally handlers (#36480)
Tip revision: b0b9fcf
.gitignore
/*.tar.gz
/tmp
/dist
/dist-extras
/julia
/julia.bat
/usr
/oprofile_data
/usr-staging
/Make.user
/julia-*
/source-dist.tmp
/source-dist.tmp1

*.exe
*.dll
*.dwo
*.do
*.o
*.o.tmp
*.obj
*.so
*.dylib
*.dSYM
*.jl.cov
*.jl.*.cov
*.jl.mem
*.jl.*.mem
*.ji

/perf*
.DS_Store
.idea/*
back to top