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 870667030C; Fri, 5 Mar 2021 01:04:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 870667030C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614895490; bh=xXhLMj3hjMFpF3NrcCRzISJurTJmBE+q6daQfM282Hw=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=afgnU0SRRFoL04oIXICdagql3XBmdqYaZ0qohbMAa7AQIDxCGUEtm7JNUrpg37TA4 tJI4+gNhlwuJt6dmIwOJjxDHjcnMATd1qlBJnNOzYTnuQ37LbIvIuEGMuzIpknnFQB TDv5SRTwgVL2jNRt5xQcvZTOh+Asg8wjN5XfRdoo= 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 dev.tarantool.org (Postfix) with ESMTPS id CE9657030C for ; Fri, 5 Mar 2021 01:04:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CE9657030C Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lHw53-00078t-Mi; Fri, 05 Mar 2021 01:04:26 +0300 Date: Fri, 5 Mar 2021 01:04:20 +0300 To: Sergey Kaplun Message-ID: <20210304220420.GL9042@tarantool.org> References: <20210216201044.20952-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210216201044.20952-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92A98208ECBDD29F5D89ACCED453B3B3D46194CE92B29E17D182A05F538085040660CDC1DAEB6C92C83446266F61D00A72152E92882A998D2AEFD3376D4205AA2 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE71D44F6E7EB16B5A3EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373D332FFE8BBF4EB58638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC7E36B7026578E6D9BCBF291262AF59C5BF2E35FFB39FE65E389733CBF5DBD5E913377AFFFEAFD269A417C69337E82CC2CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92A417C69337E82CC2CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FC9EB32FE0C26A3A4C75ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E735B344165809136645C4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2BBE337FB72E923155C0AF1600DCBC20BE687882DF87116BD255256793F6329F9 X-C1DE0DAB: 0D63561A33F958A5D2E95FC32C57B0ED03636CE22AA578F97510708883B998B1D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34BF5454112BD5BFD77345D7931FCEBA5DF771C6D7994D841D61E84838B9E06FC9B8E97B2C2251F1CE1D7E09C32AA3244CB46C438B16AF5C33E9D5C8B00F6EF37739C99C45E8D137E9927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojSsmoOoMLSh2RdrEx4m8whQ== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822FDC53FAE07EACA4FF867581688AF8177A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] core: fix cdata decrementing 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, On 16.02.21, Sergey Kaplun wrote: > When cdata has custom finalizer (and so LJ_GC_CDATA_FIN flag) it is not > collected immediately, when lj_cdata_free() is called. Instead, it is > resurrected and marked finalized, so it is collected at the next GC > cycle. The reason of the bug is that gc_cdatanum is decremented when > cdata is resurrected too (i.e. twice). > > This patch excludes cdata decrementing from resurrection branch and > adds corresponding tests. > > Resolves tarantool/tarantool#5820 > Follows up tarantool/tarantool#5187 > --- > > Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-5820-improperly-cdata-counting > Test Branch: https://github.com/tarantool/tarantool/tree/skaplun/gh-5820-improperly-cdata-counting > Issue: https://github.com/tarantool/tarantool/issues/5820 > > ChangeLog entry for bumping LuaJIT: > =================================================================== > ## bugfix/LuaJIT > > * Fix double cdata decrementing in platform metrics when finalizer is set (gh-5820). > =================================================================== I've changed the ChangeLog entry a bit. Hope, you don't mind. ================================================================================ ## bugfix/LuaJIT * Fixed double `gc_cdatanum` decrementing in LuaJIT platform metrics when a finalizer is set for GCcdata object (gh-5820). ================================================================================ > > src/lj_cdata.c | 3 +- > test/misclib-getmetrics-capi.test.lua | 15 +++++++++- > test/misclib-getmetrics-capi/testgetmetrics.c | 28 +++++++++++++++++++ > test/misclib-getmetrics-lapi.test.lua | 15 +++++++++- > 4 files changed, 58 insertions(+), 3 deletions(-) I've checked the patchset into tarantool-2.6, tarantool-2.7 and tarantool branches in tarantool/luajit and bumped a new version in 2.6, 2.7 and master. > > -- > 2.28.0 > -- Best regards, IM