[Tarantool-patches] [PATCH] serializer: check for recursive serialization

Roman Khabibov roman.habibov at tarantool.org
Fri Dec 11 06:22:23 MSK 2020


Hi!

> On Dec 8, 2020, at 22:25, Igor Munkin <imun at tarantool.org> wrote:
> 
> 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?
Let’s just add ‘hard’ limit? Only it is not clear how to calculate its
value. Just empirically?

>> 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
>> 
> 
> <snipped>
> 
>> 
> 
> [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-July/018524.html
> 
> -- 
> Best regards,
> IM



More information about the Tarantool-patches mailing list