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 A914D901943; Tue, 19 Dec 2023 13:59:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A914D901943 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1702983553; bh=1TTcdPFHEUEwpBwTdn1qbof71ixgGhp+LmPaUNS/Ypg=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=P7rf+zV+TM/3r7JtuI4oJ4VzWEtS55uaChq8bn2BWmmMpDouv6/T/gutMLvyvBcKP wi7ZKkGlwOOF/Rxfs4MTdBl/nBhcAP2+rOow/a0ycEPUtxs1gupfdXkD+WeARfZZ9m rccksYtZu6FQcc7lO5Y/a50d32loIfVyhE56eJHs= Received: from smtp42.i.mail.ru (smtp42.i.mail.ru [95.163.41.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 5BB6E733EF1 for ; Tue, 19 Dec 2023 13:59:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5BB6E733EF1 Received: by smtp42.i.mail.ru with esmtpa (envelope-from ) id 1rFXoe-00CEy1-1S; Tue, 19 Dec 2023 13:59:12 +0300 Message-ID: <74f26323-e75c-4b90-809b-3e066fb01ed3@tarantool.org> Date: Tue, 19 Dec 2023 13:59:12 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun , Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org References: <33a9a2fc1efb801bfd5b8101be16755f2b394293.1698049570.git.skaplun@tarantool.org> In-Reply-To: <33a9a2fc1efb801bfd5b8101be16755f2b394293.1698049570.git.skaplun@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD97533543916A0F71A35DDB53065FAAF90D862B8BD9C04D0D0CD62213F67905E7AF69F945A926036D86C797FE1802BABA2E975849CB8E1367D74CA12CB93F4C0D9 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7D9C4478D0B876341EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063748744D4CD6EC491D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8BE324484DE48BA2EB92F410CB6079B1C117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC974A882099E279BDA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18CB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE9647ADFADE5905B1C3123C4324A5CF10D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE34CB6874B0BCFF0B86E0066C2D8992A16C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB861051D4BA689FC2E808ACE2090B5E1725E5C173C3A84C3ED8438A78DFE0A9E089D37D7C0E48F6C8AA50765F7900637021B7B85925F8E35EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5BFFDFC7D35598C6D99E23382820C8B76DBA333413C0F5145F87CCE6106E1FC07E67D4AC08A07B9B0457EE4B4996FC546CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34D71B56C992F8AF1932002CE7FD50C0156BB004D756F1B80B46466647822435E94F0A554B7E0027E61D7E09C32AA3244C3249A38B3913BF81589C574643CF40C2FE8DA44ABE2443F785A42E4C463514DC5DA084F8E80FEBD3FFA33E6B6B2F82C47A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojgGTRFEPoGBSIi1v4I1Kr0A== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A769D2D877AD9FDD7D1AFA45672BB175F11AE5E949923882BAADEBA65886582A37BD66FEC6BF5C9C28D98A98C1125256619760D574B6FC815AB872D6B4FCE48DF648AE208404248635DF 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch! LGTM On 10/23/23 12:22, Sergey Kaplun wrote: > From: Mike Pall > > Reported by Sergey Kaplun. > > (cherry-picked from commit db944b2b56c86fcf133745976763604d96110285) > > During of an arithmetic operation with a cdata function object and some > cdata value in `carith_checkarg()`, reallocation of `cts->tab` in > `lj_ctype_intern()` may occur. In that case, the reference to the first > `CType` object (`ca->ct[0]`) becomes invalid. This patch saves the > `CTypeID` of this object and gets its `CType` again after possible > reallocation. > > Sergey Kaplun: > * added the description and the test for the problem > > Part of tarantool/tarantool#9145 > ---