mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-19 10:14:41 +00:00
BUG/MINOR: hlua/init: coroutine may not resume itself
It's not supported to call lua_resume with <L> and <from> designating the same lua coroutine. It didn't cause visible bugs so far because Lua 5.3 used to be more permissive about this, and moreover, yielding is not involved during the hlua init state. But this is wrong usage, and the doc clearly specifies that the <from> argument can be NULL when there is no such coroutine, which is the case here. This should be backported in every stable versions.
This commit is contained in:
parent
e7281f3f5d
commit
1115fc348e
@ -12872,9 +12872,9 @@ int hlua_post_init_state(lua_State *L)
|
||||
hlua_unref(L, init->function_ref);
|
||||
|
||||
#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 504
|
||||
ret = lua_resume(L, L, 0, &nres);
|
||||
ret = lua_resume(L, NULL, 0, &nres);
|
||||
#else
|
||||
ret = lua_resume(L, L, 0);
|
||||
ret = lua_resume(L, NULL, 0);
|
||||
#endif
|
||||
kind = NULL;
|
||||
switch (ret) {
|
||||
|
Loading…
Reference in New Issue
Block a user