diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_ccallback.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lj_ccallback.c b/src/lj_ccallback.c index 430643ee..e1d03fcf 100644 --- a/src/lj_ccallback.c +++ b/src/lj_ccallback.c | |||
@@ -527,10 +527,14 @@ static void callback_conv_result(CTState *cts, lua_State *L, TValue *o) | |||
527 | lua_State * LJ_FASTCALL lj_ccallback_enter(CTState *cts, void *cf) | 527 | lua_State * LJ_FASTCALL lj_ccallback_enter(CTState *cts, void *cf) |
528 | { | 528 | { |
529 | lua_State *L = cts->L; | 529 | lua_State *L = cts->L; |
530 | global_State *g = cts->g; | ||
530 | lua_assert(L != NULL); | 531 | lua_assert(L != NULL); |
531 | if (gcref(cts->g->jit_L)) | 532 | if (gcref(g->jit_L)) { |
532 | lj_err_caller(gco2th(gcref(cts->g->jit_L)), LJ_ERR_FFI_BADCBACK); | 533 | setstrV(L, L->top++, lj_err_str(L, LJ_ERR_FFI_BADCBACK)); |
533 | lj_trace_abort(cts->g); /* Never record across callback. */ | 534 | if (g->panic) g->panic(L); |
535 | exit(EXIT_FAILURE); | ||
536 | } | ||
537 | lj_trace_abort(g); /* Never record across callback. */ | ||
534 | /* Setup C frame. */ | 538 | /* Setup C frame. */ |
535 | cframe_prev(cf) = L->cframe; | 539 | cframe_prev(cf) = L->cframe; |
536 | setcframe_L(cf, L); | 540 | setcframe_L(cf, L); |