From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 6243345C305 for ; Tue, 8 Dec 2020 20:25:25 +0300 (MSK) Date: Tue, 8 Dec 2020 20:25:22 +0300 From: Igor Munkin Message-ID: <20201208172522.GL5396@tarantool.org> References: <20201117164012.14652-1-roman.habibov@tarantool.org> <20201123202841.GC14086@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH] serializer: check for recursive serialization List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Ostanevich Cc: tarantool-patches@dev.tarantool.org Sergos, On 08.12.20, Sergey Ostanevich wrote: > Hi! > > Thanks for the patch! > > My biggest concern was how would you check the recursion appears. You Well, I see the issue is reported for "identity" serializer (considering documentation request and the error message), and such recursion can be fixed the way Roma did. You're talking about a general case of infinite recursions, but I believe there is no other approach to handle this situation the way different from one Python does (I mentioned it in my previous review[1]). By the way, other runtimes such as Perl starts spamming with the corresponding warning after the recursion hits the "soft" limit, but the result is the same: stack overflow. Thoughts? > just check if the result is equivalent to the argument. To me it is > not enough, obviously. I tried this on your branch and… > > > tarantool> setmetatable({},{__serialize = function(_) return {_} end}) > Segmentation fault (core dumped) > > > Regards, > Sergos > > [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-July/018524.html -- Best regards, IM