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

Igor Munkin imun at tarantool.org
Tue Dec 8 20:25:22 MSK 2020


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
> 

<snipped>

> 

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-July/018524.html

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list