From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A2C0F469711 for ; Fri, 22 May 2020 17:05:54 +0300 (MSK) Date: Fri, 22 May 2020 17:05:30 +0300 From: Alexander Turenko Message-ID: <20200522140530.ymb2wcory6tbi5sz@tkn_work_nb> References: <20200518093748.16825-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200518093748.16825-1-skaplun@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] lua: lua_field_inspect_table without pushcfunction List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy On Mon, May 18, 2020 at 12:37:48PM +0300, Sergey Kaplun wrote: > Currently on encoding table we push cfunction (lua_field_try_serialize) > to lua stack with additional lightuserdata and table value and after > pcall that function to avoid a raise of error. It is often used to catch 'not enough memory' error. Say, to avoid a leak if some resource should be freed before reporting an error. Or when you want to return an error instead of raising it. Please, look whether it was added by intention and verify that everything still good after the patch.