From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (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 51E6C41C5DB for ; Sun, 21 Jun 2020 13:26:27 +0300 (MSK) Date: Sun, 21 Jun 2020 13:26:26 +0300 From: Sergey Ostanevich Message-ID: <20200621102626.GA16381@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH 1/2] test: disable JIT for Lua Fun totable function List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy Hi! Thanks for the patch! AFAIU you just fix one of our test. Is it make sence to fix the library code in fun.lua to bring the fix for all cutomers? Also, as soon as we know the #584 essence - how hard will it be to test all Tarantool libs for this bug? Regards, Sergos On 19 Jun 23:40, Igor Munkin wrote: > JIT compiler can generate invalid trace for function breaking > its semantics (see LuaJIT/LuaJIT#584). Since interpreter works fine and > produces right results, disabling JIT for this function (and all its > subfunctions) stops execution failures. > > Relates to LuaJIT/LuaJIT#584 > Fixes #4252 > > Signed-off-by: Igor Munkin > --- > test/box-tap/key_def.test.lua | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/test/box-tap/key_def.test.lua b/test/box-tap/key_def.test.lua > index d7dbf5b88..ce7a3cb63 100755 > --- a/test/box-tap/key_def.test.lua > +++ b/test/box-tap/key_def.test.lua > @@ -4,6 +4,14 @@ local tap = require('tap') > local ffi = require('ffi') > local json = require('json') > local fun = require('fun') > + > +-- Fix for gh-4252: to prevent invalid trace assembling (see > +-- LuaJIT/LuaJIT#584) disable JIT for fun.totable function and > +-- method (these functions are different GCfunc objects) and all > +-- their subfunctions. > +jit.off(fun.totable, true) > +jit.off(fun.iter({}).totable, true) > + > local key_def_lib = require('key_def') > > local usage_error = 'Bad params, use: key_def.new({' .. > -- > 2.25.0 >