summaryrefslogtreecommitdiff
path: root/src/lj_snap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r--src/lj_snap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c
index de8068ac..bcd03038 100644
--- a/src/lj_snap.c
+++ b/src/lj_snap.c
@@ -97,6 +97,9 @@ static BCReg snapshot_framelinks(jit_State *J, SnapEntry *map)
cTValue *ftop = frame + funcproto(frame_func(frame))->framesize;
MSize f = 0;
map[f++] = SNAP_MKPC(J->pc); /* The current PC is always the first entry. */
+ lua_assert(!J->pt ||
+ (J->pc >= proto_bc(J->pt) &&
+ J->pc < proto_bc(J->pt) + J->pt->sizebc));
while (frame > lim) { /* Backwards traversal of all frames above base. */
if (frame_islua(frame)) {
map[f++] = SNAP_MKPC(frame_pc(frame));