lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, May 23, 2020 at 3:51 PM Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>
> > Is this just regarding reworking trap, or does it also apply to the
> > original race condition I reported and my globalhook fix for it?
>
> I am not sure what you are calling "original race condition". Is it a bug?
>
> -- Roberto

The documentation says that lua_sethook "can be called asynchronously
(e.g. during a signal)", but if it's called from a signal handler that
runs at just the "right" time (after a CallInfo gets created but
before it gets linked into L->ci), and the currently running Lua code
happens to be the "right" kind of infinite loop, then the hook
function will never get called. As such, I'd consider it a bug,
especially since you could rely on this working right in Lua 5.3.

Joseph C. Sible