1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-22 02:04:49 +00:00

Fix some stack overflow bugs.

This commit is contained in:
Calvin Rose
2019-08-19 01:19:51 -04:00
parent 0360942942
commit 292be33b9d
6 changed files with 25 additions and 10 deletions

View File

@@ -628,6 +628,9 @@ static JanetSignal run_vm(JanetFiber *fiber, Janet in, JanetFiberStatus status)
VM_OP(JOP_TAILCALL) {
Janet callee = stack[D];
if (fiber->stacktop > fiber->maxstack) {
vm_throw("stack overflow");
}
if (janet_checktype(callee, JANET_KEYWORD)) {
vm_commit();
callee = resolve_method(callee, fiber);