wryun / es-shell

es: a shell with higher-order functions
http://wryun.github.io/es-shell/
Other
307 stars 25 forks source link

Root exceptions during the varpop() calls in throw(). #86

Closed jpco closed 7 months ago

jpco commented 7 months ago

This fixes a (niche) class of memory unsafety.

We define a new root list to support this, because the two existing root lists won't work: rootlist is stack-oriented, while the e variable during throw() is being carried backwards through the stack; and globalrootlist (reasonably) has no mechanism for removing a root, which is necessary for the very ephemeral exception lists.

Fixes #85.