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 31C606EC55; Wed, 25 Aug 2021 00:13:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 31C606EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1629839623; bh=wjJpGQw7Q+gRuK5Yh4B8Mn2kNpWfRtoulB903eVsqc8=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=kk5bAaaTGgst/qGWiluUrZGCNlh7iCZ92sBVEIBvvCVbPPa0hTMkit+h8pAKu8kg1 iSL2roabshuO0swtxmrQLjq8S8KjoDApZBQw5Ms6q2APPbZD2ZHguzUbaASfIcgtIL MyQNOWJce7MJyaPqOOv6eqIksdrO6yDJUh28esxc= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (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 1BA936EC55 for ; Wed, 25 Aug 2021 00:13:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1BA936EC55 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1mIdjo-0005sv-QN; Wed, 25 Aug 2021 00:13:41 +0300 To: Vladimir Davydov , Timur Safin Cc: tarantool-patches@dev.tarantool.org References: <20210819152656.viku6crt3uezsrdd@esperanza> Message-ID: <4141772d-335c-6f1e-9be6-8e0170d394a2@tarantool.org> Date: Tue, 24 Aug 2021 23:13:39 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210819152656.viku6crt3uezsrdd@esperanza> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD91BCCB18F2C129F87F36E61E9E4584E9D182A05F538085040989D903BB6060BCE74FEF3B98117BD7A55AE85E2DC369545DF4BC831FAE4808E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A8325FA649D0A450EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063752AC809489EC5B9C8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D880B21F4CC9ED56ED468C25CD1E125B89117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735209ECD01F8117BC8BEA471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C565C1E6824D8037B43847C11F186F3C59DAA53EE0834AAEE X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505E54D04B8EC1E46132BE95023727C2852 X-C1DE0DAB: 0D63561A33F958A58B1E351597FE9C43D59D8DAC2F0C5C56E75B44152D03C8FDD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75601EFBC916B793DF410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349320586B19AD2C727BBB6970E112F5CDECD90D1075D10881A96AD8A26A110E2666991D141BB8F5171D7E09C32AA3244C76C248D8940CB5AF7E32D7BF67B293BE69B6CAE0477E908DFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj4xwK62BfeftXgk9BxSmz1A== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D6E88CDB826774FF4AAF0EBFB7D0F03BB3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v6 1/5] build, lua: built-in module datetime 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" >> +local function datetime_tostring(o) >> + if ffi.typeof(o) == datetime_t then >> + local sz = 48 >> + local buff = ffi.new('char[?]', sz) > > I think we've agreed that the buffer used for formatting should be > global. If you are going with a global buffer, please, take into account Lua GC and tickets 5632, 6050, 6259. If there is going to be a global buffer, it must be properly shared. For example, using buffer.ffi_stash_new(). See it source and usages to find what that is.