[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: bug: crash while calling function from yielded state with line hook set
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 30 Jul 2010 10:01:33 -0300
> Call to lua function from c using yielded lua_State works fine.
> But same call with line hook set crashes in lvm.c line 71.
> Lua version 5.1.4
>
> Code to reproduce:
>
> [...]
This message (http://lua-users.org/lists/lua-l/2010-03/msg00387.html)
is from almost five months ago; only now we got some time to look at
it.
The code in question calls lua_pcall on a suspended thread. Although
this was not documented, such call is illegal. You can only resume a
suspended thread (one with status LUA_YIELD). By chance it works
when there are no line hooks, but it is invalid nonetheless.
-- Roberto