diff options
| author | Mike Pall <mike> | 2021-09-21 16:42:35 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2021-09-21 16:42:35 +0200 |
| commit | 204cee2c917f55f288c0b166742e56c134fe578c (patch) | |
| tree | 582103b4dc5759a6cf39e294f3e522e4bc901509 | |
| parent | 68ffbd318b331b988c32ecfdeee965e9683889f4 (diff) | |
| download | luajit-204cee2c917f55f288c0b166742e56c134fe578c.tar.gz luajit-204cee2c917f55f288c0b166742e56c134fe578c.tar.bz2 luajit-204cee2c917f55f288c0b166742e56c134fe578c.zip | |
Fix stack allocation after on-trace stack check.
| -rw-r--r-- | src/lj_trace.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lj_trace.c b/src/lj_trace.c index 654d157a..1ee00fd5 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c | |||
| @@ -452,7 +452,11 @@ static void trace_stop(jit_State *J) | |||
| 452 | lua_assert(J->parent != 0 && J->cur.root != 0); | 452 | lua_assert(J->parent != 0 && J->cur.root != 0); |
| 453 | lj_asm_patchexit(J, traceref(J, J->parent), J->exitno, J->cur.mcode); | 453 | lj_asm_patchexit(J, traceref(J, J->parent), J->exitno, J->cur.mcode); |
| 454 | /* Avoid compiling a side trace twice (stack resizing uses parent exit). */ | 454 | /* Avoid compiling a side trace twice (stack resizing uses parent exit). */ |
| 455 | traceref(J, J->parent)->snap[J->exitno].count = SNAPCOUNT_DONE; | 455 | { |
| 456 | SnapShot *snap = &traceref(J, J->parent)->snap[J->exitno]; | ||
| 457 | snap->count = SNAPCOUNT_DONE; | ||
| 458 | if (J->cur.topslot > snap->topslot) snap->topslot = J->cur.topslot; | ||
| 459 | } | ||
| 456 | /* Add to side trace chain in root trace. */ | 460 | /* Add to side trace chain in root trace. */ |
| 457 | { | 461 | { |
| 458 | GCtrace *root = traceref(J, J->cur.root); | 462 | GCtrace *root = traceref(J, J->cur.root); |
