From: Igor Munkin <imun@tarantool.org> To: Roman Khabibov <roman.habibov@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH] serilaizer: check for recursive serialization Date: Wed, 16 Sep 2020 10:29:16 +0300 [thread overview] Message-ID: <20200916072916.GL18920@tarantool.org> (raw) In-Reply-To: <A3C4705A-327D-42F4-857F-01383EF1E517@tarantool.org> Roma, On 14.09.20, Roman Khabibov wrote: > Hi, Cyrill and Igor! > > I tried to compare the addresses of the previous and the current iteration, > if they are equal, then throw "looks like recursion, bad function!”. Could you please share your patch? > But I got swim tests failing. That is, they use some recursive > serializers that do not overflow the stack. Is it done intentionally or this behaviour can be changed? > Therefore, I settled on the idea of introducing a recursion limit. Nevertheless, I still propose one of the following: * make the limit configurable via box interface * introduce a "soft" limit to inform user when recursion occurs (e.g. using log with "WARN" facility) and a "hard" one to stop the instance IMHO, the best is to implement both proposals. Thoughts? Side note: __tostring Lua metamethod obligues user to yield a string, but I see __serialize method doesn't have such restrictions. Otherwise, the fix would be brief and clear. > <snipped> > -- Best regards, IM
next prev parent reply other threads:[~2020-09-16 7:39 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-10 12:01 Roman Khabibov 2020-07-10 12:29 ` Cyrill Gorcunov 2020-07-14 9:45 ` Igor Munkin 2020-07-14 10:40 ` Cyrill Gorcunov 2020-09-14 14:43 ` Roman Khabibov 2020-09-14 16:06 ` Cyrill Gorcunov 2020-09-16 7:29 ` Igor Munkin [this message] 2020-09-30 21:49 ` Roman Khabibov 2020-10-01 14:40 ` Igor Munkin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200916072916.GL18920@tarantool.org \ --to=imun@tarantool.org \ --cc=roman.habibov@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH] serilaizer: check for recursive serialization' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox