]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Don't start a trace on side exit to non-Lua function.
authorMike Pall <mike>
Fri, 31 Jan 2014 19:44:27 +0000 (20:44 +0100)
committerMike Pall <mike>
Fri, 31 Jan 2014 19:44:27 +0000 (20:44 +0100)
src/lj_trace.c

index b4b3fc26104a57534a0c18de5e45f617ef5f4237..7bb6c8aeafc6dd0eae80d438dff7284095d3a7aa 100644 (file)
@@ -682,6 +682,7 @@ static void trace_hotside(jit_State *J, const BCIns *pc)
 {
   SnapShot *snap = &traceref(J, J->parent)->snap[J->exitno];
   if (!(J2G(J)->hookmask & (HOOK_GC|HOOK_VMEVENT)) &&
+      isluafunc(curr_func(J->L)) &&
       snap->count != SNAPCOUNT_DONE &&
       ++snap->count >= J->param[JIT_P_hotexit]) {
     lua_assert(J->state == LJ_TRACE_IDLE);