|
Hi!
I guess, I found a bug again in the debugging
interface:
Consider this piece of code:
k=0;
function secondcall() return 2; //LUA_HOOKRET *is* called for this line end function firstcall()
return secondcall(); //LUA_HOOKRET is *not* called for this line end k=firstcall();
k=0; k=1; the bug seems to be in lvm.c,v 1.284 2003/04/03
13:35:34, line 662:
When the first part of the if-statement is
called, then the LUA_HOOKRET hook is omitted.
/* previous function was running `here'?
*/
if (!(ci->state & CI_CALLING))
{
lua_assert((ci->state & CI_C) || ci->u.l.pc != &pc); return ra; /* no: return */ } else
{ /* yes: continue its execution */
...
}
Does anyone have suggestions for a
fix?
The else-branch calls a function luaD_poscall to
process the debug return hooks.
Is that the appropriate function that needs to be
called in order to fix the bug?
Jan-Eric Duden
|