Handle on-trace OOM errors from helper functions.

This commit is contained in:
Mike Pall
2021-03-23 00:35:46 +01:00
parent ddd0fd8f37
commit a32aeadc68
24 changed files with 421 additions and 51 deletions

View File

@@ -455,6 +455,7 @@ static void LJ_FASTCALL recff_pcall(jit_State *J, RecordFFData *rd)
#endif
lj_record_call(J, 0, J->maxslot - 1);
rd->nres = -1; /* Pending call. */
J->needsnap = 1; /* Start catching on-trace errors. */
} /* else: Interpreter will throw. */
}
@@ -490,6 +491,7 @@ static void LJ_FASTCALL recff_xpcall(jit_State *J, RecordFFData *rd)
if (errcode)
lj_err_throw(J->L, errcode); /* Propagate errors. */
rd->nres = -1; /* Pending call. */
J->needsnap = 1; /* Start catching on-trace errors. */
} /* else: Interpreter will throw. */
}