From 45c067ddddaae1bedc3e07b6f5af65aea3beceac Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 19 Jan 2014 13:09:20 +0100 Subject: [PATCH 1/2] FFI: Fix cts->L for cdata unsinking in snapshot restore. --- src/lj_snap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_snap.c b/src/lj_snap.c index 4d211898..1c978c26 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c @@ -708,7 +708,7 @@ static void snap_unsink(jit_State *J, GCtrace *T, ExitState *ex, ir->o == IR_CNEW || ir->o == IR_CNEWI); #if LJ_HASFFI if (ir->o == IR_CNEW || ir->o == IR_CNEWI) { - CTState *cts = ctype_ctsG(J2G(J)); + CTState *cts = ctype_cts(J->L); CTypeID id = (CTypeID)T->ir[ir->op1].i; CTSize sz = lj_ctype_size(cts, id); GCcdata *cd = lj_cdata_new(cts, id, sz); From 926686ad3ddb51e4c74294854946b085ac50373b Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 19 Jan 2014 13:11:48 +0100 Subject: [PATCH 2/2] Fix OSX build issue. --- src/vm_x86.dasc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc index a36d2aa7..8a9b536d 100644 --- a/src/vm_x86.dasc +++ b/src/vm_x86.dasc @@ -6344,12 +6344,12 @@ static void emit_asm_debug(BuildCtx *ctx) #if LJ_64 "\t.byte 0xe\n\t.byte 16\n" /* def_cfa_offset */ "\t.byte 0x86\n\t.byte 0x2\n" /* offset rbp */ - "\t.byte 0xd\n\t.uleb128 0x6\n" /* def_cfa_register rbp */ + "\t.byte 0xd\n\t.byte 0x6\n" /* def_cfa_register rbp */ "\t.byte 0x83\n\t.byte 0x3\n" /* offset rbx */ #else "\t.byte 0xe\n\t.byte 8\n" /* def_cfa_offset */ "\t.byte 0x84\n\t.byte 0x2\n" /* offset ebp (4 for MACH-O)*/ - "\t.byte 0xd\n\t.uleb128 0x4\n" /* def_cfa_register ebp */ + "\t.byte 0xd\n\t.byte 0x4\n" /* def_cfa_register ebp */ "\t.byte 0x83\n\t.byte 0x3\n" /* offset ebx */ #endif "\t.align " BSZPTR "\n"