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 45E286EC55; Thu, 22 Jul 2021 11:15:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 45E286EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1626941736; bh=edj7iGBg3+3/ZWX4z+kzdyNfUwbdzldHB43QijgIR8s=; 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=J5sodO3WhQ9OtGHdl251B+Zf4u90zL/7Q2Bw9ZklI9oN0xwjHEV8zPSWo5KnzwuCk fjIZWe5zhrAJR+rT31RBtrHVXe1mut85sQPFECbgbjYEHaGJqoeMe9da4gT/BzEFmU SIHFFTyDdtUkD1zOWwdjHvToE+pldBSaHNRITAIs= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (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 47C336EC55 for ; Thu, 22 Jul 2021 11:15:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 47C336EC55 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1m6Trh-0002zU-Af; Thu, 22 Jul 2021 11:15:33 +0300 Date: Thu, 22 Jul 2021 10:51:58 +0300 To: Sergey Kaplun Message-ID: <20210722075158.GK11494@tarantool.org> References: <20210712120652.23695-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210712120652.23695-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C3A9514C5AE4B3B389A94BDFA06D40730D182A05F538085040A0790890A9B10C6C9AA05C4D1A49760B09D7BAFC5C995F0791D669FE574D9287 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C6068CE86C2B75F5EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006376AFB9B40001E44068638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D83E4C345118699D9C30C050F8C19A3278117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD182CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6753C3A5E0A5AB5B7089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5834CE95FE1C4362E0D271D5E60FE350F9259D0EA9C63D563D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D347D10A9FCB2A62DFEA8FAB5BB7421EAE3AA34FB9C988085B3FBA86AA066128B183C09162058A633E61D7E09C32AA3244C17F0E32AE396D0ECC72EFF044CCE03D11DD47778AE04E04D927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojaAaPr+N/4d3lnikqZOkZGA== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D79BA500704D776ECF26B8A77F1329632A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] Fix IR_BUFPUT assembly. 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 1.10, 2.7, 2.8 and master. On 12.07.21, Sergey Kaplun wrote: > From: Mike Pall > > Thanks to Peter Cawley. > > (cherry picked from commit 58d0dde0a2df49abc991decbabff15230010829a) > > When recording IR_BUFPTR special variable holds -1 value to mark that > argument to store is not a single character. If it is, then it can be > stored in a register directly. When storing a single character we store > it in the aforementioned variable first to reset the -1 value. But when > the system has signed characters, and the character to store equals > \255, the check that the variable still holds -1 value becomes false > positive and either wrong value is stored or the LuaJIT crashes. > > This patch changes the flag value to -129 to avoid intersections with > any `char` values. > > Sergey Kaplun: > * added the description and the test for the problem > --- > > The patch fixes the problem described in TNT-142. > > Tarantool branch: https://github.com/tarantool/tarantool/tree/skaplun/lj-375-fix-ir-bufput > Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-375-fix-ir-bufput > Issue: https://github.com/LuaJIT/LuaJIT/issues/375 > > src/lj_asm.c | 6 +++--- > .../lj-375-ir-bufput-signed-char.test.lua | 17 +++++++++++++++++ > 2 files changed, 20 insertions(+), 3 deletions(-) > create mode 100644 test/tarantool-tests/lj-375-ir-bufput-signed-char.test.lua > > -- > 2.31.0 > -- Best regards, IM