From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp43.i.mail.ru (smtp43.i.mail.ru [94.100.177.103]) (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 07D04469710 for ; Fri, 5 Jun 2020 10:14:56 +0300 (MSK) Date: Fri, 5 Jun 2020 10:14:43 +0300 From: Sergey Kaplun Message-ID: <20200605071443.GA5027@root> References: <20200602121949.20254-1-skaplun@tarantool.org> <20200602135140.GC5745@tarantool.org> <20200602141636.GA8942@root> <20200602141303.GD5745@tarantool.org> <20200602150104.GA14098@root> <20200602165714.GC50@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200602165714.GC50@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v2] lua: remove excess Lua call from table encoding List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Ostanevich Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy Hi! It's a little bit complicated to find a good test that shows the difference of behaviour. AFAIK there is only one case when we can face with OOM error or so on - reallocating of Lua stack. But it can happen with old version too (when we push cfunction, table or lightuserdata at Lua stack before pcall). Now instead three values we push at Lua stack only two (Lua function from metatable and table itself if serializing function exists) before pcall. So with this patch the probability of raising OOM error should be decreased. Of course we can check it with an eror injection, but it can be catched with old behaviour too. It will be nice if you can provide any idea of this kind of test to check this. On 02.06.20, Sergey Ostanevich wrote: > Hi! > > Thanks for the patch! > > Still I would like to see some tests - perhaps with errinj to emulate > OOM or some other case that trigger the 'excess protected frame' need. > So that after your changes it still passes. > > Regards, > Sergos > -- Best regards, Sergey Kaplun