diff options
author | Mike Pall <mike> | 2010-01-27 01:57:15 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-01-27 01:57:15 +0100 |
commit | 05d67cf5660323ef139858b586977c7709ff8a4c (patch) | |
tree | e6efa13bdc1cb9118348897c6b46c67dc7074047 | |
parent | c8a80fa989116591ef1995eb33e5fee87de18978 (diff) | |
download | luajit-05d67cf5660323ef139858b586977c7709ff8a4c.tar.gz luajit-05d67cf5660323ef139858b586977c7709ff8a4c.tar.bz2 luajit-05d67cf5660323ef139858b586977c7709ff8a4c.zip |
Add missing check for return to lower frame.
-rw-r--r-- | src/lj_record.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index 3f442088..c14a9e86 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -1510,12 +1510,13 @@ static void rec_ret(jit_State *J, BCReg rbase, int gotresults) | |||
1510 | J->tailcalled = 0; | 1510 | J->tailcalled = 0; |
1511 | while (frame_ispcall(frame)) { | 1511 | while (frame_ispcall(frame)) { |
1512 | BCReg cbase = (BCReg)frame_delta(frame); | 1512 | BCReg cbase = (BCReg)frame_delta(frame); |
1513 | if (J->framedepth-- <= 0) | ||
1514 | lj_trace_err(J, LJ_TRERR_NYIRETL); | ||
1513 | lua_assert(J->baseslot > 1); | 1515 | lua_assert(J->baseslot > 1); |
1514 | J->baseslot -= (BCReg)cbase; | 1516 | J->baseslot -= (BCReg)cbase; |
1515 | J->base -= cbase; | 1517 | J->base -= cbase; |
1516 | *--res = TREF_TRUE; /* Prepend true to results. */ | 1518 | *--res = TREF_TRUE; /* Prepend true to results. */ |
1517 | gotresults++; | 1519 | gotresults++; |
1518 | J->framedepth--; | ||
1519 | frame = frame_prevd(frame); | 1520 | frame = frame_prevd(frame); |
1520 | } | 1521 | } |
1521 | if (J->framedepth-- <= 0) | 1522 | if (J->framedepth-- <= 0) |