Explorar o código

Clear bytecode penalty cache in jit.flush().

Mike Pall %!s(int64=14) %!d(string=hai) anos
pai
achega
96ef87bdfd
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/lj_trace.c

+ 2 - 0
src/lj_trace.c

@@ -274,6 +274,8 @@ int lj_trace_flushall(lua_State *L)
   }
   J->cur.traceno = 0;
   J->freetrace = 0;
+  /* Clear penalty cache. */
+  memset(J->penalty, 0, sizeof(J->penalty));
   /* Free the whole machine code and invalidate all exit stub groups. */
   lj_mcode_free(J);
   memset(J->exitstubgroup, 0, sizeof(J->exitstubgroup));