From 7498ee204e9ccfad000d795460b2e7434032187d Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Wed, 22 Feb 2012 16:27:44 +0100 Subject: [PATCH] Fix argument error handling on Lua stacks without a frame. --- src/lj_debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lj_debug.c b/src/lj_debug.c index fab198fe..c2dc0dd8 100644 --- a/src/lj_debug.c +++ b/src/lj_debug.c @@ -279,6 +279,8 @@ const char *lj_debug_funcname(lua_State *L, TValue *frame, const char **name) TValue *pframe; GCfunc *fn; BCPos pc; + if (frame <= tvref(L->stack)) + return NULL; if (frame_isvarg(frame)) frame = frame_prevd(frame); pframe = frame_prev(frame);