GC break after 'Fix GC steps threshold handling when called by JIT-compiled code.'

  • From: Юрий Соколов <funny.falcon@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 21 Nov 2013 19:17:51 +0400

Just updated luajit 2.1 , and my script starts to blow up memory.

8a2b2beac2ef985965fd6e4b4a0a32a684fa51df - first bad commit in v2.1
(so that, both 'Fix GC steps threshold...' and 'Fix for last commit' are
involved)

Reverting following change fixes issue:

-------------------------------- src/lj_trace.c
--------------------------------
index c70fc24..add9da6 100644
@@ -776,11 +776,11 @@ int LJ_FASTCALL lj_trace_exit(jit_State *J, void
*exptr)
   pc = exd.pc;
   cf = cframe_raw(L->cframe);
   setcframe_pc(cf, pc);
   if (G(L)->gc.state == GCSatomic || G(L)->gc.state == GCSfinalize) {
     if (!(G(L)->hookmask & HOOK_GC))
-      lj_gc_step(L);  /* Exited because of GC: drive GC forward. */
+      lj_gc_check(L);  /* Exited because of GC: drive GC forward. */
   } else {
     trace_hotside(J, pc);
   }
   if (bc_op(*pc) == BC_JLOOP) {
     BCIns *retpc = &traceref(J, bc_d(*pc))->startins;


With regards,
Sokolov Yura aka funny_falcon

Other related posts: