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 8C0A36AF5D2; Wed, 25 Oct 2023 13:52:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8C0A36AF5D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1698231167; bh=IRst/FMxXlQ6gNCObSIs/8fMcZcVQoerCwdlv6bEBY0=; 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=idtUOeSJIZkvXLV/kY+D1e4UL3qN34XfCBHtFXgw/7Q10EN8C99DKzuh+oJN7FZXJ rTWeiyVK+w3zt/iOE1JmnIWRaI3+CcqHrqgF9YeGYBsJzbaRNlgNP3L/GPlwmjQjhn b67gAhSAYRRpRr8ik6c3HbQoXY90AWuvAUyu6lnk= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [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 94FAB65341F for ; Wed, 25 Oct 2023 13:52:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 94FAB65341F Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1qvbVF-0004eo-Pm; Wed, 25 Oct 2023 13:52:46 +0300 Date: Wed, 25 Oct 2023 13:48:16 +0300 To: Maxim Kokryashkin Message-ID: References: <33a9a2fc1efb801bfd5b8101be16755f2b394293.1698049570.git.skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9315D6E1B1B5C3D6DC232CB6F24005D11807874EA19E1CCF400894C459B0CD1B95F0A0593928B1A61004FD324313DB2E7FFC1AB2505DEBAB9F0D203FE66146AB1 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE712EB008F780777E9EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637EA9DEEAA3ECF8E948638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D86F0A97064D93A3064C3D985DED8009C3117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC8C7ADC89C2F0B2A5A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD186FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269176DF2183F8FC7C0C70DDB8F70474A6A68655334FD4449CB33AC447995A7AD186D8C47C27EEC5E9FD5E8D9A59859A8B66106518975EE654D089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5FE73EB93D60400B4546F203A43063FBFF40911B9918A5D80F87CCE6106E1FC07E67D4AC08A07B9B0E753FA5741D1AD02CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D343D50AEDB859DBAD97957FB6B6A62D9E022C23E88C335D1F47A51CD809E889582FA4FFAF51A961CC81D7E09C32AA3244C5059E04AC52C20479FA5C6508DABDAFA3E8609A02908F27185A42E4C463514DC5DA084F8E80FEBD3202CD0F03380D9577A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj7UiV2qa299r5gRvDMc4F3g== X-DA7885C5: B6363530B8E756EBCC8438B4A6D05989B0D6029718CC244413EACA31C7598039262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986BCC4DB1FC5568DC80AB238356FF4466610FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 6/6] FFI: Fix dangling reference to CType in carith_checkarg(). 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Maxim! Thanks for the review! On 25.10.23, Maxim Kokryashkin wrote: > Hi, Sergey! > LGTM, after fixing the same comments, as for the previous patches. See the iterative patch below, branch is force-pushed. =================================================================== diff --git a/test/tarantool-tests/lj-1108-fix-dangling-reference-to-ctype.test.lua b/test/tarantool-tests/lj-1108-fix-dangling-reference-to-ctype.test.lua index 43a39886..a077344e 100644 --- a/test/tarantool-tests/lj-1108-fix-dangling-reference-to-ctype.test.lua +++ b/test/tarantool-tests/lj-1108-fix-dangling-reference-to-ctype.test.lua @@ -10,7 +10,7 @@ test:plan(1) -- This test demonstrates LuaJIT's incorrect behaviour when the -- reallocation of `cts->tab` strikes during the arithmetic cdata -- metamethod. --- The test fails under ASAN. +-- Before the patch, the test failed only under ASAN. -- XXX: Just some C functions to be casted. There is no need to -- declare their prototypes correctly. @@ -37,6 +37,9 @@ local _ = ffi.new('struct {int a; long b; float c; double d;}', 0) -- Anchor table to prevent cdata objects from being collected. local anchor = {} -- Each call to this function grows `cts->top` by 3. +-- `lj_ctype_new()` and `lj_ctype_intern()` during the parsing of +-- the `CType` declaration in the `ffi.cast()` plus +-- `lj_ctype_intern()` during the conversion to another `CType`. local function save_new_func(func) anchor[#anchor + 1] = ffi.cast('void (*)(void)', func) end =================================================================== -- Best regards, Sergey Kaplun