1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-14 23:37:40 +00:00

Move funcenv verification to runtime.

Lazy verification makes it easier to not leave funcenvs
in an invalid state, as well as be more precise with the validation.
We needed to verify the FuncEnvs actually pointed to a stack frame if
they were of the "on-stack" variant. There was some minor checking
before, but it was not enough to prevent func envs from pointing to
memory that was off of the fiber stack, overlapping stack frames, etc.
This commit is contained in:
Calvin Rose
2020-04-06 10:58:47 -05:00
parent c3c42ef56f
commit 72beeeeaaa
6 changed files with 48 additions and 23 deletions

View File

@@ -232,4 +232,10 @@ neldb\0\0\0\xD8\x05printG\x01\0\xDE\xDE\xDE'\x03\0marshal_tes/\x02
(unmarshal b load-image-dict)
(gccollect)
(def v
(unmarshal
@"\xD7\xCD0\xD4000000\0\x03\x01\xCE\00\0\x01\0\0000\x03\0\0\0000000000\xCC0\0000"
load-image-dict))
(gccollect)
(end-suite)