tarantool / tarantool/tarantool
merger: non-array tuple in a buffer leads to assertion fail
Open
Nobody has claimed this yet.
app
bug
crash
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 419
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 88
Description
Tarantool version: 2.5.0-62-gbb7c3d167 (in fact since merger was introduced in 2.2.0-268-gc7915eccd).
#!/usr/bin/env tarantool
local buffer = require('buffer')
local msgpack = require('msgpack')
local merger = require('merger')
local tuple = 1 -- Not an array!
local buf = buffer.ibuf()
msgpack.encode({tuple}, buf)
local exp_err = 'A tuple must be an array'
local source = merger.new_source_frombuffer(buf)
local ok, err = pcall(source.select, source)
assert(ok == true, ':select() should fail')
assert(err == exp_err, 'verify error message')
os.exit(0)
Expected result: zero exit code.
Actual result:
$ ./case.lua
tarantool: /var/tmp/portage/dev-db/tarantool-9999/work/tarantool-9999/src/box/tuple.h:894: mp_tuple_assert: Assertion `mp_typeof(*tuple) == MP_ARRAY' failed.
Aborted
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.