Skip to content

Commit

Permalink
lj_trace: Log trace aborts to auditlog
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed May 24, 2017
1 parent 2dfdb73 commit 376fb58
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lj_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ void lj_trace_err(jit_State *J, TraceError e)
{
setnilV(&J->errinfo); /* No error info. */
setintV(J->L->top++, (int32_t)e);
lj_auditlog_trace_abort(J, e);
lj_err_throw(J->L, LUA_ERRRUN);
}

/* Synchronous abort with error message and error info. */
void lj_trace_err_info(jit_State *J, TraceError e)
{
setintV(J->L->top++, (int32_t)e);
lj_auditlog_trace_abort(J, e);
lj_err_throw(J->L, LUA_ERRRUN);
}

Expand Down Expand Up @@ -511,6 +513,7 @@ static int trace_abort(jit_State *J)
J->cur.traceno = 0;
}
L->top--; /* Remove error object */
lj_auditlog_trace_abort(J, e);
if (e == LJ_TRERR_DOWNREC)
return trace_downrec(J);
else if (e == LJ_TRERR_MCODEAL)
Expand Down

0 comments on commit 376fb58

Please sign in to comment.