From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 9F2D4243B4 for ; Mon, 9 Sep 2019 14:53:25 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FwDm_xVayQ0l for ; Mon, 9 Sep 2019 14:53:25 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id E115D243B3 for ; Mon, 9 Sep 2019 14:53:24 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 0/4] Serializer bugs From: Vladislav Shpilevoy References: Message-ID: Date: Mon, 9 Sep 2019 20:57:04 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: alexander.turenko@tarantool.org Sorry, too many changes from Kostja. I send v2 in a separate thread. On 04/09/2019 23:44, Vladislav Shpilevoy wrote: > The patchset fixes several problems about JSON and msgpack serializers. > > 1) msgpackffi didn't use msgpack serializer options; > 2) tuple serializer either; > 3) update of a serializer option was not reflected in its Lua representation; > 4) during serialization too nested tables are silently cropped and there was no > way to prevent it. > > The patchset depends on fix of #4366 provided by Kirill. > > Also it was discovered, that msgpackffi does not care *all* options. Not only > about max_depth. I am not sure if it is worth fixing here (or at all) though. > > Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-4434-box-lua-msgpack-cfg > Issue: https://github.com/tarantool/tarantool/issues/4434 > > Vladislav Shpilevoy (4): > app: serializers update now is reflected in Lua > msgpack: make msgpackffi use encode_max_depth option > tuple: use global msgpack serializer in Lua tuple > app: allow to raise an error on too nested tables > > src/box/lua/tuple.c | 32 +++++++++++++------ > src/lua/msgpack.c | 4 +++ > src/lua/msgpackffi.lua | 6 ++-- > src/lua/utils.c | 37 ++++++++++++---------- > src/lua/utils.h | 15 +++++++++ > test/app-tap/json.test.lua | 3 +- > test/app-tap/lua/serializer_test.lua | 31 +++++++++++++++++++ > test/app-tap/msgpack.test.lua | 3 +- > test/app-tap/msgpackffi.test.lua | 30 +++++++++++++++++- > test/box/tuple.result | 46 ++++++++++++++++++++++++++++ > test/box/tuple.test.lua | 21 +++++++++++++ > test/unit/luaT_tuple_new.c | 2 +- > third_party/lua-cjson/lua_cjson.c | 10 ++++-- > 13 files changed, 207 insertions(+), 33 deletions(-) >