diff options
author | Mike Pall <mike> | 2010-08-06 14:34:54 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2010-08-06 14:34:54 +0200 |
commit | 3d81368331482e84b1e18efc46bbd4b44375cd91 (patch) | |
tree | 8ccf11a0540fd828b56e0a95cf2cfd6fc893a006 /src | |
parent | 0a3329c581b8acc7f3c9473dd02d92a1838655c3 (diff) | |
download | luajit-3d81368331482e84b1e18efc46bbd4b44375cd91.tar.gz luajit-3d81368331482e84b1e18efc46bbd4b44375cd91.tar.bz2 luajit-3d81368331482e84b1e18efc46bbd4b44375cd91.zip |
Fix lua_cpcall(). Duplicate save corrupted C frame chain.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildvm_x64.h | 4 | ||||
-rw-r--r-- | src/buildvm_x64win.h | 4 | ||||
-rw-r--r-- | src/buildvm_x86.dasc | 2 | ||||
-rw-r--r-- | src/buildvm_x86.h | 20 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h index 9962d4b0..9672731d 100644 --- a/src/buildvm_x64.h +++ b/src/buildvm_x64.h | |||
@@ -41,8 +41,8 @@ static const unsigned char build_actionlist[14080] = { | |||
41 | 139,90,252,252,137,68,36,4,252,247,195,237,15,132,244,13,255,252,233,244, | 41 | 139,90,252,252,137,68,36,4,252,247,195,237,15,132,244,13,255,252,233,244, |
42 | 14,248,25,85,83,65,87,65,86,72,131,252,236,40,187,237,137,76,36,20,252,233, | 42 | 14,248,25,85,83,65,87,65,86,72,131,252,236,40,187,237,137,76,36,20,252,233, |
43 | 244,247,248,26,85,83,65,87,65,86,72,131,252,236,40,187,237,248,1,137,84,36, | 43 | 244,247,248,26,85,83,65,87,65,86,72,131,252,236,40,187,237,248,1,137,84,36, |
44 | 16,137,252,253,137,124,36,24,137,252,241,248,2,76,139,189,233,76,137,124, | 44 | 16,137,252,253,137,124,36,24,137,252,241,76,139,189,233,76,137,124,36,32, |
45 | 36,32,137,108,36,28,72,137,165,233,68,139,181,233,65,129,198,239,248,3,65, | 45 | 137,108,36,28,72,137,165,233,248,2,68,139,181,233,65,129,198,239,248,3,65, |
46 | 199,134,233,237,139,149,233,1,203,41,211,139,133,233,41,200,193,232,3,131, | 46 | 199,134,233,237,139,149,233,1,203,41,211,139,133,233,41,200,193,232,3,131, |
47 | 192,1,248,27,255,139,105,252,248,129,121,253,252,252,239,15,133,244,28,248, | 47 | 192,1,248,27,255,139,105,252,248,129,121,253,252,252,239,15,133,244,28,248, |
48 | 29,137,202,137,90,252,252,139,157,233,139,11,15,182,252,233,15,182,205,131, | 48 | 29,137,202,137,90,252,252,139,157,233,139,11,15,182,252,233,15,182,205,131, |
diff --git a/src/buildvm_x64win.h b/src/buildvm_x64win.h index eaefbe0b..fbf233ad 100644 --- a/src/buildvm_x64win.h +++ b/src/buildvm_x64win.h | |||
@@ -40,8 +40,8 @@ static const unsigned char build_actionlist[14029] = { | |||
40 | 133,233,41,200,193,232,3,131,192,1,41,209,139,114,252,252,137,68,36,84,252, | 40 | 133,233,41,200,193,232,3,131,192,1,41,209,139,114,252,252,137,68,36,84,252, |
41 | 247,198,237,15,132,244,13,255,252,233,244,14,248,25,85,87,86,83,72,131,252, | 41 | 247,198,237,15,132,244,13,255,252,233,244,14,248,25,85,87,86,83,72,131,252, |
42 | 236,40,190,237,68,137,76,36,92,252,233,244,247,248,26,85,87,86,83,72,131, | 42 | 236,40,190,237,68,137,76,36,92,252,233,244,247,248,26,85,87,86,83,72,131, |
43 | 252,236,40,190,237,248,1,68,137,68,36,88,137,205,137,76,36,96,137,209,248, | 43 | 252,236,40,190,237,248,1,68,137,68,36,88,137,205,137,76,36,96,137,209,72, |
44 | 2,72,139,189,233,72,137,124,36,104,137,108,36,100,72,137,165,233,139,157, | 44 | 139,189,233,72,137,124,36,104,137,108,36,100,72,137,165,233,248,2,139,157, |
45 | 233,129,195,239,248,3,199,131,233,237,139,149,233,1,206,41,214,139,133,233, | 45 | 233,129,195,239,248,3,199,131,233,237,139,149,233,1,206,41,214,139,133,233, |
46 | 41,200,193,232,3,131,192,1,248,27,255,139,105,252,248,129,121,253,252,252, | 46 | 41,200,193,232,3,131,192,1,248,27,255,139,105,252,248,129,121,253,252,252, |
47 | 239,15,133,244,28,248,29,137,202,137,114,252,252,139,181,233,139,14,15,182, | 47 | 239,15,133,244,28,248,29,137,202,137,114,252,252,139,181,233,139,14,15,182, |
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc index 493820b6..f293cd23 100644 --- a/src/buildvm_x86.dasc +++ b/src/buildvm_x86.dasc | |||
@@ -650,7 +650,6 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | |||
650 | | mov RA, INARG_BASE // Caveat: overlaps SAVE_CFRAME! | 650 | | mov RA, INARG_BASE // Caveat: overlaps SAVE_CFRAME! |
651 | |.endif | 651 | |.endif |
652 | | | 652 | | |
653 | |2: // Entry point for vm_cpcall below (RA = base, RB = L, PC = ftype). | ||
654 | | mov KBASEa, L:RB->cframe // Add our C frame to cframe chain. | 653 | | mov KBASEa, L:RB->cframe // Add our C frame to cframe chain. |
655 | | mov SAVE_CFRAME, KBASEa | 654 | | mov SAVE_CFRAME, KBASEa |
656 | | mov SAVE_PC, L:RB // Any value outside of bytecode is ok. | 655 | | mov SAVE_PC, L:RB // Any value outside of bytecode is ok. |
@@ -660,6 +659,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | |||
660 | | mov L:RB->cframe, esp | 659 | | mov L:RB->cframe, esp |
661 | |.endif | 660 | |.endif |
662 | | | 661 | | |
662 | |2: // Entry point for vm_cpcall below (RA = base, RB = L, PC = ftype). | ||
663 | | mov DISPATCH, L:RB->glref // Setup pointer to dispatch table. | 663 | | mov DISPATCH, L:RB->glref // Setup pointer to dispatch table. |
664 | | add DISPATCH, GG_G2DISP | 664 | | add DISPATCH, GG_G2DISP |
665 | | | 665 | | |
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h index e7f0da64..547cd0d2 100644 --- a/src/buildvm_x86.h +++ b/src/buildvm_x86.h | |||
@@ -39,16 +39,16 @@ static const unsigned char build_actionlist[15234] = { | |||
39 | 133,233,41,200,193,232,3,131,192,1,41,209,139,114,252,252,137,68,36,20,252, | 39 | 133,233,41,200,193,232,3,131,192,1,41,209,139,114,252,252,137,68,36,20,252, |
40 | 247,198,237,15,132,244,13,255,252,233,244,14,248,25,85,87,86,83,131,252,236, | 40 | 247,198,237,15,132,244,13,255,252,233,244,14,248,25,85,87,86,83,131,252,236, |
41 | 28,190,237,252,233,244,247,248,26,85,87,86,83,131,252,236,28,190,237,248, | 41 | 28,190,237,252,233,244,247,248,26,85,87,86,83,131,252,236,28,190,237,248, |
42 | 1,139,108,36,48,139,76,36,52,248,2,139,189,233,137,124,36,52,137,108,36,24, | 42 | 1,139,108,36,48,139,76,36,52,139,189,233,137,124,36,52,137,108,36,24,137, |
43 | 137,165,233,139,157,233,129,195,239,248,3,199,131,233,237,139,149,233,1,206, | 43 | 165,233,248,2,139,157,233,129,195,239,248,3,199,131,233,237,139,149,233,1, |
44 | 41,214,139,133,233,41,200,193,232,3,131,192,1,248,27,255,139,105,252,248, | 44 | 206,41,214,139,133,233,41,200,193,232,3,131,192,1,248,27,255,139,105,252, |
45 | 129,121,253,252,252,239,15,133,244,28,248,29,137,202,137,114,252,252,139, | 45 | 248,129,121,253,252,252,239,15,133,244,28,248,29,137,202,137,114,252,252, |
46 | 181,233,139,14,15,182,252,233,15,182,205,131,198,4,252,255,36,171,248,30, | 46 | 139,181,233,139,14,15,182,252,233,15,182,205,131,198,4,252,255,36,171,248, |
47 | 85,87,86,83,131,252,236,28,139,108,36,48,139,68,36,56,139,76,36,52,139,84, | 47 | 30,85,87,86,83,131,252,236,28,139,108,36,48,139,68,36,56,139,76,36,52,139, |
48 | 36,60,137,108,36,24,139,189,233,43,189,233,199,68,36,60,0,0,0,0,137,124,36, | 48 | 84,36,60,137,108,36,24,139,189,233,43,189,233,199,68,36,60,0,0,0,0,137,124, |
49 | 56,137,68,36,8,137,76,36,4,137,44,36,139,189,233,137,124,36,52,137,165,233, | 49 | 36,56,137,68,36,8,137,76,36,4,137,44,36,139,189,233,137,124,36,52,137,165, |
50 | 252,255,210,133,192,15,132,244,15,137,193,190,237,252,233,244,2,248,11,1, | 50 | 233,252,255,210,133,192,15,132,244,15,137,193,190,237,252,233,244,2,248,11, |
51 | 209,131,230,252,248,137,213,41,252,242,199,68,193,252,252,237,137,200,139, | 51 | 1,209,131,230,252,248,137,213,41,252,242,199,68,193,252,252,237,137,200,139, |
52 | 117,252,244,139,77,252,240,139,122,252,248,139,191,233,139,191,233,252,255, | 52 | 117,252,244,139,77,252,240,139,122,252,248,139,191,233,139,191,233,252,255, |
53 | 225,248,31,255,15,182,78,252,255,131,252,237,16,141,12,202,41,252,233,15, | 53 | 225,248,31,255,15,182,78,252,255,131,252,237,16,141,12,202,41,252,233,15, |
54 | 132,244,32,252,247,217,193,252,233,3,137,76,36,8,139,72,4,139,0,137,77,4, | 54 | 132,244,32,252,247,217,193,252,233,3,137,76,36,8,139,72,4,139,0,137,77,4, |