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 3A7A26FC83; Thu, 30 Jun 2022 15:20:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3A7A26FC83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1656591622; bh=qohg7arTdzxCac4EzqUGYbTw5kr5lzu49/77l84FgWg=; 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=CvLSKqZD4VITM0ttcXr6Ab9Vc3m77nh2tUqrOrKFwOpwfHpNkFtfuplSMdhvaspYi QXPzZnSuc6MQvBFKrLdmo9fiEJo/LYItTzQA5YM95c5FMiFY0U5KxWlI7HUv8Kid+j aaayeuWabMuIBOZbAyBg0j2ZTYm8jujfDfPBNko8= 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 5B0636DB0F for ; Thu, 30 Jun 2022 15:18:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5B0636DB0F Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1o6t7Q-0000jZ-JX; Thu, 30 Jun 2022 15:18:01 +0300 Date: Thu, 30 Jun 2022 15:10:49 +0300 To: Sergey Kaplun Message-ID: References: <20211215101734.6065-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211215101734.6065-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9F05DDD76985F9126E1DDAE1C6EB0772846459A7F84F1DAA6182A05F538085040D038D2123F31E9897B28145C9E3EF229B45F958FC9730D1E76203E2237BCE045 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE797F4D2EDC29AFAF7EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375ABF1810CDE7D0E9EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B8859CA687ABA27BA498B32C29FD9BFFD38AFA7111CC84119CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F7900637DCE3DBD6F8E38AFD389733CBF5DBD5E9B5C8C57E37DE458B9E9CE733340B9D5F3BBE47FD9DD3FB595F5C1EE8F4F765FC72CEEB2601E22B093A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E73557739F23D657EF2BB5C8C57E37DE458BEDA766A37F9254B7 X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 9604B64F49C60606AD91A466A1DEF99B296C473AB1E14218C6CDE5D1141D2B1C63EBED25B40ECB4CDF7D5610997C137A180F50366663484EAD91A466A1DEF99B296C473AB1E14218B936CB490224F2464EEA7BD89490CAC0EDDA962BC3F61961 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34C1E32F4AD4B2486B4B14E669598EA8BFEAFB72B762326796F64DB8BD20635E6A42FE5ED40383B5E21D7E09C32AA3244CB750EBBC1D066F32E1DABE891707A08630452B15D76AEC14927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojhvrbUd41KJnsOM4cr1M6Lw== X-Mailru-Sender: 689FA8AB762F7393CC2E0F076E87284E5B21B95F949902D9C80273F2F1B8E76EA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] Fix write barrier for lua_setupvalue() and debug.setupvalue(). 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, I've checked the patch into all long-term branches in tarantool/luajit and bumped a new version in master, 2.10 and 1.10. On 15.12.21, Sergey Kaplun wrote: > From: Mike Pall > > (cherry picked from e613105ca92fe25e7bd63031b409faa8c908ac35) > > Child function inherits parents upvalues. Assume parent function is > marked first (all closed upvalues and function are colored to black), > and then `debug.setupvalue()`/`lua_setupvalue()` is called for an > unmarked child function with inherited upvalues. The barrier is tried to > move forward (but not actually move, due to the colors of operands) for > a non-marked function (instead marked upvalue). Now black upvalue refers > to a white object. Black objects can't refer white objects due to GC > invariant, so the invariant is violated. > > This patch changes a function object to an upvalue for barrier movement. > > Sergey Kaplun: > * added the description and the test for the problem > > Part of tarantool/tarantool#6548 > --- > Related issue: https://github.com/tarantool/tarantool/issues/6548 > Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-gc-setupvalue-full-ci > Tarantool branch: https://github.com/tarantool/tarantool/tree/skaplun/gh-noticket-fix-gc-setupvalue-full-ci > > Note: CI is red. But this job is red on master too... > > src/lj_api.c | 8 ++- > src/lj_debug.c | 7 ++- > src/lj_debug.h | 3 +- > .../fix-gc-setupvalue.test.lua | 60 +++++++++++++++++++ > test/tarantool-tests/utils.lua | 32 ++++++++++ > 5 files changed, 104 insertions(+), 6 deletions(-) > create mode 100644 test/tarantool-tests/fix-gc-setupvalue.test.lua > > -- > 2.34.1 > -- Best regards, IM