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
History
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
File Mode Size
.devcontainer
base
contrib
deps
doc
etc
src
stdlib
test
ui
.appveyor.yml -rw-r--r-- 2.1 KB
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 273 bytes
.mailmap -rw-r--r-- 11.0 KB
.travis.yml -rw-r--r-- 6.1 KB
CITATION.bib -rw-r--r-- 2.6 KB
CONTRIBUTING.md -rw-r--r-- 19.9 KB
HISTORY.md -rw-r--r-- 275.6 KB
LICENSE.md -rw-r--r-- 5.0 KB
Make.inc -rw-r--r-- 44.1 KB
Makefile -rw-r--r-- 26.9 KB
NEWS.md -rw-r--r-- 16.4 KB
README.md -rw-r--r-- 6.3 KB
VERSION -rw-r--r-- 10 bytes
sysimage.mk -rw-r--r-- 3.9 KB

README.md

back to top