mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Avoid recursive GC steps after GC-triggered trace exit.
This commit is contained in:
parent
5dbb6671a3
commit
9589e11e44
@ -775,10 +775,12 @@ int LJ_FASTCALL lj_trace_exit(jit_State *J, void *exptr)
|
|||||||
pc = exd.pc;
|
pc = exd.pc;
|
||||||
cf = cframe_raw(L->cframe);
|
cf = cframe_raw(L->cframe);
|
||||||
setcframe_pc(cf, pc);
|
setcframe_pc(cf, pc);
|
||||||
if (G(L)->gc.state == GCSatomic || G(L)->gc.state == GCSfinalize)
|
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_step(L); /* Exited because of GC: drive GC forward. */
|
||||||
else
|
} else {
|
||||||
trace_hotside(J, pc);
|
trace_hotside(J, pc);
|
||||||
|
}
|
||||||
if (bc_op(*pc) == BC_JLOOP) {
|
if (bc_op(*pc) == BC_JLOOP) {
|
||||||
BCIns *retpc = &traceref(J, bc_d(*pc))->startins;
|
BCIns *retpc = &traceref(J, bc_d(*pc))->startins;
|
||||||
if (bc_isret(bc_op(*retpc))) {
|
if (bc_isret(bc_op(*retpc))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user