From 0ded8e82a88fadb40b4dd7e6632311781f1b2f91 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 9 Dec 2013 00:29:56 +0100 Subject: [PATCH] Fix call unroll checks in the presence of metamethod frames. --- src/lj_record.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lj_record.c b/src/lj_record.c index 30b9efc1..154ff380 100644 --- a/src/lj_record.c +++ b/src/lj_record.c @@ -1389,6 +1389,7 @@ static void check_call_unroll(jit_State *J, TraceNo lnk) int32_t count = 0; if ((J->pt->flags & PROTO_VARARG)) depth--; /* Vararg frame still missing. */ for (; depth > 0; depth--) { /* Count frames with same prototype. */ + if (frame_iscont(frame)) depth--; frame = frame_prev(frame); if (mref(frame_func(frame)->l.pc, void) == pc) count++;