Fix loader crash when some unhalted exception happens during include
command execution. In case of such unhandled exception, vmReset() inside ficlExecC() flushes the VM state. Attempt to return back to Forth after that cause garbage dereference with unexpected results. To avoid that situation call vmThrow() directly instead of expecting Forth to do it.
This commit is contained in:
parent
988b7ac395
commit
e57dfaa1b0
@ -132,6 +132,12 @@ bf_command(FICL_VM *vm)
|
||||
result=BF_PARSE;
|
||||
}
|
||||
free(line);
|
||||
/*
|
||||
* If there was error during nested ficlExec(), we may no longer have
|
||||
* valid environment to return. Throw all exceptions from here.
|
||||
*/
|
||||
if (result != 0)
|
||||
vmThrow(vm, result);
|
||||
/* This is going to be thrown!!! */
|
||||
stackPushINT(vm->pStack,result);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user