From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 0D3F36FFA3; Thu, 25 Mar 2021 00:24:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0D3F36FFA3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616621079; bh=MgshvjZE3mGTZCxLSmQVqHE9WFDCsolElJopncuIXjk=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Vr/osduDDBS4E96Im0CZdEzwirgWTrcPDLuvXdVcBapV3BAVq+zzoAev46Bff/WYr K44ZRW8g7hyHKGauQqiUxCtykfB9J8qJ8hDK8g01wMd3Vws1SIJfgA7zHWdMcWeP4C FSCi5DKYRa6V3wUmmhNDhSUVUcFXdWW/bGh6Es6E= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 34F0A6FC8F for ; Thu, 25 Mar 2021 00:24:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 34F0A6FC8F Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1lPAzU-0004ib-PE; Thu, 25 Mar 2021 00:24:37 +0300 To: tarantool-patches@dev.tarantool.org, kyukhin@tarantool.org Date: Wed, 24 Mar 2021 22:24:20 +0100 Message-Id: X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9064ADF4728AA0EE9F3698E42D5F8E2CF5ABB710F58BD1CA8182A05F538085040D4113E569E770FD6B54A78EA65668A85275C85F4C78484AE68FA9A23E1C78C03 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F9D05773942AAE9CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A6A20D80F0832BC78638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C5DD32608FC869F5D0A2A3FB037D0BE88841FA1CEC635DE12A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE709B92020B71E24959FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3253F27DA5A70FAF3117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CFAE74DA0800744AAFBA3038C0950A5D36C8A9BA7A39EFB766EC990983EF5C0329BA3038C0950A5D36D5E8D9A59859A8B636C6EC11B1A5ECB976E601842F6C81A1F004C906525384307823802FF610243DF43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B3BBE47FD9DD3FB59A8DF7F3B2552694A2BEBFE083D3B9BA73A03B725D353964BB11811A4A51E3B096D1867E19FE14079BA9C0B312567BB23089D37D7C0E48F6CA18204E546F3947CB26E97DCB74E625257739F23D657EF2BC8A9BA7A39EFB7666BA297DBC24807EA089D37D7C0E48F6C8AA50765F790063757B1FBEA53BC6EDBEFF80C71ABB335746BA297DBC24807EA27F269C8F02392CD6143B1329D1CCA5627F269C8F02392CD5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2368A440D3B0F6089093C9A16E5BC824AC8B6CDF511875BC4E8F7B195E1C97831148145A0506FFD487A82484DD75C3D90 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C4C7A0BC55FA0FE5FC1763F9D2EFCE7A1A806D297DC72AA324EAC5C81939D9B454B1881A6453793CE9C32612AADDFBE0618A54D9CE31EF87DE9510FB958DCE06DB6ED91DBE5ABE359ADBCB5631A0A9D21F8D1F0E447259586B93EDB24507CE13387DFF0A840B692CF8 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3429538671E6527D32C4D3BD878636BEEA7F414F9C5D77B77B5DF548EA335787938390010877E09BB71D7E09C32AA3244C8DAB1B2CD4D98714BFEC5826143BF286F522A1CF68F4BE05729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojjqzNotmU+gdq1rabIE6fww== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA3110A906815429F9D960F5ECA6205C418077A3B68E5AF1B865DF07784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH 00/15] Cord buffer, static alloc, and Lua GC bug for 1.10 X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" The patchset is a ported fix for 5632 from the master branch. No big changes except these: - 1.10 didn't have static_alloc in Lua directly, but still the static buffer could be returned indirectly from tt_uuid_str() for example; - 1.10 didn't have Lua registers, but had some global variables created via ffi.new(). For example, in uuid.lua, msgpackffi.lua; - sio address formatting function was formatted differently. Nonetheless the commit messages are left intact. They still mention static_alloc and Lua registers. Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5632-global-buf-crash-1.10 Issue: https://github.com/tarantool/tarantool/issues/5632 Vladislav Shpilevoy (15): fio: don't use shared buffer in pread() test: don't use IBUF_SHARED in the tests tuple: pass global ibuf explicitly where possible iconv: take errno before reseting the context cord_buf: introduce cord_buf API cord_buf: introduce ownership management buffer: implement ffi stash uuid: replace static_alloc with ffi stash uuid: drop tt_uuid_str() from Lua uri: replace static_alloc with ffi stash and ibuf lua: use lua_pushfstring() instead of tt_sprintf() sio: rework sio_strfaddr() sio: increase SERVICE_NAME_MAXLEN size sio: introduce and use sio_snprintf() buffer: remove Lua registers changelogs/unreleased/fix-ibuf-static.md | 7 + extra/exports | 5 +- src/CMakeLists.txt | 1 + src/box/lua/schema.lua | 47 ++++-- src/box/lua/session.c | 7 +- src/box/lua/space.cc | 6 +- src/box/lua/tuple.c | 80 +++++----- src/box/lua/tuple.lua | 14 +- src/cord_buf.c | 165 +++++++++++++++++++++ src/cord_buf.h | 49 ++++++ src/lua/buffer.lua | 101 ++++++++++++- src/lua/fio.lua | 3 +- src/lua/iconv.lua | 27 ++-- src/lua/init.c | 3 - src/lua/msgpack.c | 6 +- src/lua/msgpackffi.lua | 46 +++--- src/lua/socket.lua | 14 +- src/lua/uri.lua | 22 ++- src/lua/utf8.c | 21 +-- src/lua/utils.h | 1 - src/lua/uuid.lua | 37 +++-- src/sio.cc | 67 +++++---- src/sio.h | 16 +- test/app-tap/buffer.test.lua | 59 ++++++++ test/app-tap/gh-5632-gc-buf-reuse.test.lua | 151 +++++++++++++++++++ test/app-tap/module_api.test.lua | 3 +- test/app/fio.result | 103 ++++++++----- test/app/fio.test.lua | 68 +++++---- test/app/msgpack.result | 7 +- test/app/msgpack.test.lua | 5 +- test/app/uuid.result | 2 +- test/unit/luaT_tuple_new.c | 4 - 32 files changed, 901 insertions(+), 246 deletions(-) create mode 100644 changelogs/unreleased/fix-ibuf-static.md create mode 100644 src/cord_buf.c create mode 100644 src/cord_buf.h create mode 100755 test/app-tap/buffer.test.lua create mode 100755 test/app-tap/gh-5632-gc-buf-reuse.test.lua -- 2.24.3 (Apple Git-128)