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 9D846225A8D; Thu, 12 Jan 2023 18:10:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9D846225A8D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1673536246; bh=Jd0anLmdr/4YBurRirGNVb1OOGEuig8CpUiWQ/Uq0Ss=; 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=bAhc5k5rfsIMfoiilwTPGPITZr5iSVTozSJfY60zPvj8Tx+FX7K3iXcdFKd/4G8n5 9nHu0zdfH+RjSRNUfLV0gc7Ir8BMUDWhNQgVZQaPmtZLiuOElAY7JuTfx/m4Y289UX HI2N92p9Nc/DVVCpMUfgak4CaBtRWVM/sUm/eGwQ= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 D24F0225A8D for ; Thu, 12 Jan 2023 18:10:21 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D24F0225A8D Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1pFzDg-0000SD-PN; Thu, 12 Jan 2023 18:10:21 +0300 Date: Thu, 12 Jan 2023 17:55:31 +0300 To: Sergey Kaplun Message-ID: References: <20221208054618.9104-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221208054618.9104-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD90D1502B3BE350FE44BC24A9F8A7FC58A4C1C09CC36F4444C00894C459B0CD1B9AD0A553A676D745169F355766A02251AFB327B4D0904B7FA090598096E5E7227 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE72F22E6DC541F75D9EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006377548186386978BE68638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D89041A09671F6301B433C7DBD366B5CE2117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3733B5EC72352B9FA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520CCD848CCB6FE560CCB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B60A62CEF541B197C8089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D347D10A9FCB2A62DFEE784965FFB328A6642E5532D6FE99035AE0A83CEC8340EC1CFFEE0172538AE6D1D7E09C32AA3244C228FA789E7B6C4D18C19484C00DA0C9F69B6CAE0477E908D83B48618A63566E0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojI459hkOkW/YYlqNrEwO+YQ== X-DA7885C5: 746DBE4AE7FE5C22D241DCC263E26C0C3EF1112EFE6651C4E16C0A5D7025A360262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73933AF1F914F131DBF5C81E687BB02F74B9A99306369E6D3ECEA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] LJ_GC64: Fix ir_khash for non-string GCobj. 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 patches into all long-term branches in tarantool/luajit and bumped a new version in master, 2.10 and 1.10. On 08.12.22, Sergey Kaplun via Tarantool-patches wrote: > From: Mike Pall > > Contributed by Peter Cawley. > > (cherry picked from commit b4ed3219a1a98dd9fe7d1e3eeea3b82f5a780948) > > When emitting `IR_HREF` for constant value to lookup the `ir_khash()` > function is used to calculate hash for the corresponding object. > This calculation must be the same as in the corresponding `hashkey()` > function from . > > Hash calculating via passing two arguments `lo`, and `hi` to `hashrot()` > routine. For non-string GC objects the first `lo` argument is the same > for GC64 and not GC64 mode -- lower 32 bits of the object address. For > GC64 mode `hi` argument is upper 32 bits of the object address, > including specific type NaN-tag. This `hi` argument in `ir_khash()` > function is miscalculated in GC64 using non-GC64 value (`lo` + > `HASH_BIAS`). As a result, the hash for the GC object is miscalculated > on trace and we exit from trace due to assertion guard on the type or > value check. > > This patch fixes calculation of hash value on trace for GC64 mode by > making it consistent with `hashkey()`. > > Sergey Kaplun: > * added the description and the test for the problem > > Part of tarantool/tarantool#7230 > --- > > Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-356-ir-khash-non-string-obj-full-ci > Issue/PR: > * https://github.com/tarantool/tarantool/issues/7230 > * https://github.com/LuaJIT/LuaJIT/pull/356 > Tarantool PR: https://github.com/tarantool/tarantool/pull/8020 > > Side note: Problems with red fuzzer jobs look irrelevant to the patch. > > src/lj_asm.c | 4 + > .../lj-356-ir-khash-non-string-obj.test.lua | 90 +++++++++++++++++++ > 2 files changed, 94 insertions(+) > create mode 100644 test/tarantool-tests/lj-356-ir-khash-non-string-obj.test.lua > > -- > 2.34.1 > -- Best regards, IM