]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: lua: all functions calling lua_yieldk() may return
authorWilly Tarreau <w@1wt.eu>
Tue, 16 Oct 2018 15:52:55 +0000 (17:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 16 Oct 2018 15:56:20 +0000 (17:56 +0200)
commit9635e03c41e95dff38731f67cc9d8b00e3731d2a
tree11c5e0fee37ba1634938de5c19db0c4d6aa51a5e
parente09101e8d92b0c0ef8674fbc791e309112ab7f1c
MINOR: lua: all functions calling lua_yieldk() may return

There was a mistake when tagging functions which always use longjmp and
those which may use it in that all those supposed to call lua_yieldk()
may return without calling longjmp. Thus they must not use WILL_LJMP()
but MAY_LJMP(). It has zero impact on the code emitted as such, but
prevents other fixes from being properly implemented : this was the
cause of the previous failure with the __unreachable() calls.

This may be backported to older versions. It may or may not apply
well depending on the context, though the change simply consists in
replacing "WILL_LJMP(hlua_yieldk" with "MAY_LJMP(hlua_yieldk", and
same with the single call to lua_yieldk() in hlua_yieldk().
src/hlua.c