From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [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 9DBBF41C5DC for ; Fri, 19 Jun 2020 23:49:57 +0300 (MSK) From: Igor Munkin Date: Fri, 19 Jun 2020 23:40:47 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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: Vladislav Shpilevoy , Sergey Ostanevich , "Alexander V. Tikhonov" Cc: tarantool-patches@dev.tarantool.org 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