[Tarantool-patches] [PATCH 02/16] Check data_offset overflow in struct tuple

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Jul 12 20:15:32 MSK 2020


> diff --git a/test/box/huge_field_map_long.test.lua b/test/box/huge_field_map_long.test.lua
> new file mode 100644
> index 0000000..6415615
> --- /dev/null
> +++ b/test/box/huge_field_map_long.test.lua
> @@ -0,0 +1,28 @@
> +env = require('test_run')
> +test_run = env.new()
> +
> +s = box.schema.space.create('test', {engine = 'memtx'})
> +test_run:cmd("setopt delimiter ';'")
> +function test()
> +    local t = {}
> +    local k = {}
> +    for i = 1,128 do
> +        local parts = {}
> +        for j = 0,127 do
> +            table.insert(parts, {i * 128 - j, 'uint'})
> +            table.insert(t, 1)
> +        end
> +        if i == 1 then k = table.deepcopy(t) end
> +        s:create_index('test'..i, {parts = parts})
> +        if i % 16 == 0 then
> +            s:replace(t)
> +            s:delete(k)
> +        end
> +    end
> +end;
> +test_run:cmd("setopt delimiter ''");

So this test would crash even without multikeys? With just too many
field offsets? How long does it work?

And why do you need to try to many combinations, if you know which one was
going to crash before the patch?


More information about the Tarantool-patches mailing list