[Tarantool-patches] [PATCH luajit 2/2] Fix maxslots when recording BC_VARG, part 2.

Igor Munkin imun at tarantool.org
Tue Jul 18 11:18:38 MSK 2023


Sergey,

Thanks for the patch! Again, everything is fine with the commit message
after resolving the comments left by Max, but the black voodoo magic
condition is still unclear (see my comments to the first patch).

On 10.07.23, Sergey Kaplun wrote:
> From: Mike Pall <mike>
> 

<snipped>

> diff --git a/test/tarantool-tests/lj-1024-varg-maxslot.test.lua b/test/tarantool-tests/lj-1024-varg-maxslot.test.lua
> index 14270595..f8d74e8a 100644
> --- a/test/tarantool-tests/lj-1024-varg-maxslot.test.lua
> +++ b/test/tarantool-tests/lj-1024-varg-maxslot.test.lua

<snipped>

> @@ -20,4 +20,21 @@ end
>  
>  test:ok(true, 'BC_VARG recording 0th frame depth')
>  
> +-- Now the same case, but with additional frame, so VARG slots
> +-- are defined on the trace.
> +local function bump_varg_frame(...)
> +  -- BC_VARG 1 1 0. `...` is nil (argument for the script).
> +  -- luacheck: ignore
> +  -- XXX: some condition to use several slots on the Lua stack.
> +  anchor = 1 >= 1, ...

Clarification is required here as well as for the first test.

> +end
> +
> +counter = 0
> +while counter < 3 do
> +  counter = counter + 1
> +  bump_varg_frame()
> +end
> +
> +test:ok(true, 'BC_VARG recording with defined on trace VARG slots')

Minor: I believe it should be "BC_VARG recording with VARG slots defined
on the trace", but I might be missing something.

> +
>  os.exit(test:check() and 0 or 1)
> -- 
> 2.34.1
> 

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list