<HTML><BODY><div>I suppose no tests are needed since this one is pretty straightforward.</div><hr><div> </div><div>Lua stack was broken because we forgot to clear the context<br>in case of an error when return value of called function was<br>not serializable.</div><div> </div><div>Closes #4617<br>---<br>Branch:<br><a href="https://github.com/tarantool/tarantool/compare/eljashm/gh-4617-broken-lua-stack">https://github.com/tarantool/tarantool/compare/eljashm/gh-4617-broken-lua-stack</a> <br>Issue:<br><a href="https://github.com/tarantool/tarantool/issues/4617">https://github.com/tarantool/tarantool/issues/4617</a> </div><div> </div><div>@ChangeLog<br>Remove context from lua stack in case of an error.</div><div> </div><div> src/box/lua/call.c | 1 +<br> 1 file changed, 1 insertion(+)</div><div>diff --git a/src/box/lua/call.c b/src/box/lua/call.c<br>index 6588ec2fa..7ab49983d 100644<br>--- a/src/box/lua/call.c<br>+++ b/src/box/lua/call.c<br>@@ -436,6 +436,7 @@ port_lua_do_dump(struct port *base, struct mpstream *stream,<br>     int top = lua_gettop(L);<br>     if (lua_cpcall(L, handler, &ctx) != 0) {<br>         luaT_toerror(port->L);<br>+        lua_pop(L, 1); <br>         return -1;<br>     }<br>     lua_settop(L, top);<br>-- <br>2.24.0</div></BODY></HTML>