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 26814673961; Mon, 23 Oct 2023 12:32:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 26814673961 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1698053532; bh=S45eolFG5lPk0gstOOIFEn4lek99+zKxRv/+MU53/3Y=; 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=f6xs6oR9LgZcODwR7Ukls29QnHVxRuVXjHdhYjmqigpH0RoZIyCx+ih8UGD6lTqmn h8RpfuKc4nE9M+LywHgfIEMy4SUl85HwqXtuEnuYg6PNmWF6RSKXnLxPqbvfUKu8MJ iTzoegD68yvbz2jjd4GMtG/MmHB3Y5hZ73S7Wmd4= 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 EBB8A673961 for ; Mon, 23 Oct 2023 12:32:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EBB8A673961 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1qurIA-00019k-2d; Mon, 23 Oct 2023 12:32:10 +0300 Date: Mon, 23 Oct 2023 12:27:41 +0300 To: Maxim Kokryashkin Message-ID: References: <9b2713c1405073d42c14f3179ff5a8fb338a37dd.1697034851.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: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9C197A170B57C5E439657E68312A3F9FAAEE1A104DA02393300894C459B0CD1B934B9DCC211C43A960574EF283D44CABB08F89D8EC0FEE90F40D08F30CB48EA5E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76D34FAA3D8B31588C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE728F774C865CF4B07EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BE5CCB53A13BC8DBA35A5B2934E34559D1947698E3A650744CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F3E38EE449E3E2AE389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8C2B5EEE3591E0D35F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE33AC447995A7AD189C87C2358C8A9BAF3A03B725D353964B2FFDA4F57982C5F435872C767BF85DA227C277FBC8AE2E8BAEFF4136F5E2B48575ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5C03E754150B0BD26C84A96AD6EA3756BAD2112B2AFC46B8CF87CCE6106E1FC07E67D4AC08A07B9B062B3BD3CC35DA588CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF5FFE973FFED3F62EAA2D1B35718B50A38FDA4090CD5B0E9272724F82440D40D59B17B6A7F8D99C9BA8B50B9382ADB12A1AE3F58FE4DECDFF16FB4B1C1586B9CCE48CAC7CA610320002C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojqlVu258LHAH8yZBBxsOvSw== X-DA7885C5: 0E29991CB990867E19C58D7C5AB9E424409A897A8BBB9676CC02C4FA244AC225262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986B10BB28BD2F48E0AA902DB2B2C83B0D480FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/2] Fix register mask for stack check in head of side trace. 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! Please, consider my answers below. On 13.10.23, Maxim Kokryashkin wrote: > Hi, Sergey! > Thanks for the patch! > LGTM, except for a few nits below. > On Wed, Oct 11, 2023 at 06:04:09PM +0300, Sergey Kaplun wrote: > > From: Mike Pall > > > > Analyzed by Sergey Kaplun. > > > > (cherry-picked from commit b7a8c7c184257858699454408420dd5f0b6c8a75) > > > > Assume we have parent and child traces with the following IRs from the > > IR dump: > > > > Parent: > > | 0009 rax > tab TNEW 0 0 > > | 0010 p32 FLOAD 0008 tab.node > > | 0011 p32 HREFK 0010 "Name" @1 > > | 0012 {0008} tab HSTORE 0011 0009 > > | .... SNAP 2 [ ---- 0001 0002 0008 ---- ] > > | 0013 {sink} tab TNEW 0 0 > > | 0014 {0008} fal HSTORE 0011 false > > | .... SNAP 3 [ ---- 0001 0002 0008 ---- ] > > > > Child: > > | 0001 r15 tab SLOAD 1 PI > > | 0002 rbp tab SLOAD 2 PI > > | 0003 tab PVAL 9 > > > > As we can see from the trace dump above, the `rax` register is missing > > in the `0003 PVAL` IR for the side trace -- so it is assumed to be > > available in the allow RegSet inside `asm_stack_check()` and its value > > is spoiled during this check, so if we are restoring from the 3rd > Typo: s/spoiled/spilled/ I mean spoiled (damaged) (with incorrect value) here -- there is no spill, but incorrect value as `ir->r`. > > snapshot by stack overflow -- we are in trouble. > > > > The moment when IR is spoiled is when we set a hint on the register > Typo: s/spoiled/spilled/ Ditto. > > inherited from the parent trace (see `asm_setup_regsp()` for details). > > -- Best regards, Sergey Kaplun