diff options
author | Mike Pall <mike> | 2014-11-28 20:20:12 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2014-11-28 20:20:12 +0100 |
commit | c75c62b489ebd0b4f9eb35af3b7d5a071939721e (patch) | |
tree | 433d787b37a1c9c2c6dec6e146f3d6f786f6dc56 /src | |
parent | a31c317fb59964be6ab4414fbaea4abebef1c0f5 (diff) | |
download | luajit-c75c62b489ebd0b4f9eb35af3b7d5a071939721e.tar.gz luajit-c75c62b489ebd0b4f9eb35af3b7d5a071939721e.tar.bz2 luajit-c75c62b489ebd0b4f9eb35af3b7d5a071939721e.zip |
Fix snapshot #0 handling for traces with a stack check on entry.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_asm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index 2afa92d0..f15458b9 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -1373,6 +1373,11 @@ static void asm_head_side(ASMState *as) | |||
1373 | int pass3 = 0; | 1373 | int pass3 = 0; |
1374 | IRRef i; | 1374 | IRRef i; |
1375 | 1375 | ||
1376 | if (as->snapno && as->topslot > as->parent->topslot) { | ||
1377 | /* Force snap #0 alloc to prevent register overwrite in stack check. */ | ||
1378 | as->snapno = 0; | ||
1379 | asm_snap_alloc(as); | ||
1380 | } | ||
1376 | allow = asm_head_side_base(as, irp, allow); | 1381 | allow = asm_head_side_base(as, irp, allow); |
1377 | 1382 | ||
1378 | /* Scan all parent SLOADs and collect register dependencies. */ | 1383 | /* Scan all parent SLOADs and collect register dependencies. */ |