From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 17 Sep 2018 18:42:56 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH] lua: fix assertion failure after improper box.schema.user:passwd() call Message-ID: <20180917154256.ujn4jpm56hx2njnp@esperanza> References: <20180910133643.22656-1-sergepetrenko@tarantool.org> <20180914151752.f7f2nwa5dtpu334u@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Serge Petrenko Cc: tarantool-patches@freelists.org List-ID: On Mon, Sep 17, 2018 at 05:48:53PM +0300, Serge Petrenko wrote: > diff --git a/src/box/lua/session.c b/src/box/lua/session.c > index b2e1400b6..7541da0a7 100644 > --- a/src/box/lua/session.c > +++ b/src/box/lua/session.c > @@ -201,8 +201,11 @@ lbox_session_su(struct lua_State *L) > /* Restore the original credentials. */ > fiber_set_user(fiber(), old_credentials); > > - if (error) > + if (error) { > + luaT_toerror(L); > luaT_error(L); > + } > + Turns out we can simply use lua_error() instead. I fixed it and pushed the patch to 1.10.