[Tarantool-patches] [PATCH 1/2] test: disable JIT for Lua Fun totable function
Sergey Ostanevich
sergos at tarantool.org
Sun Jun 21 13:26:26 MSK 2020
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 <totable> 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 <imun at tarantool.org>
> ---
> 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
>
More information about the Tarantool-patches
mailing list