[Tarantool-patches] [PATCH 00/15] Cord buffer, static alloc, and Lua GC bug for 1.10
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Thu Mar 25 00:24:20 MSK 2021
The patchset is a ported fix for 5632 from the master branch.
No big changes except these:
- 1.10 didn't have static_alloc in Lua directly, but still the static buffer
could be returned indirectly from tt_uuid_str() for example;
- 1.10 didn't have Lua registers, but had some global variables created via
ffi.new(). For example, in uuid.lua, msgpackffi.lua;
- sio address formatting function was formatted differently.
Nonetheless the commit messages are left intact. They still mention
static_alloc and Lua registers.
Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5632-global-buf-crash-1.10
Issue: https://github.com/tarantool/tarantool/issues/5632
Vladislav Shpilevoy (15):
fio: don't use shared buffer in pread()
test: don't use IBUF_SHARED in the tests
tuple: pass global ibuf explicitly where possible
iconv: take errno before reseting the context
cord_buf: introduce cord_buf API
cord_buf: introduce ownership management
buffer: implement ffi stash
uuid: replace static_alloc with ffi stash
uuid: drop tt_uuid_str() from Lua
uri: replace static_alloc with ffi stash and ibuf
lua: use lua_pushfstring() instead of tt_sprintf()
sio: rework sio_strfaddr()
sio: increase SERVICE_NAME_MAXLEN size
sio: introduce and use sio_snprintf()
buffer: remove Lua registers
changelogs/unreleased/fix-ibuf-static.md | 7 +
extra/exports | 5 +-
src/CMakeLists.txt | 1 +
src/box/lua/schema.lua | 47 ++++--
src/box/lua/session.c | 7 +-
src/box/lua/space.cc | 6 +-
src/box/lua/tuple.c | 80 +++++-----
src/box/lua/tuple.lua | 14 +-
src/cord_buf.c | 165 +++++++++++++++++++++
src/cord_buf.h | 49 ++++++
src/lua/buffer.lua | 101 ++++++++++++-
src/lua/fio.lua | 3 +-
src/lua/iconv.lua | 27 ++--
src/lua/init.c | 3 -
src/lua/msgpack.c | 6 +-
src/lua/msgpackffi.lua | 46 +++---
src/lua/socket.lua | 14 +-
src/lua/uri.lua | 22 ++-
src/lua/utf8.c | 21 +--
src/lua/utils.h | 1 -
src/lua/uuid.lua | 37 +++--
src/sio.cc | 67 +++++----
src/sio.h | 16 +-
test/app-tap/buffer.test.lua | 59 ++++++++
test/app-tap/gh-5632-gc-buf-reuse.test.lua | 151 +++++++++++++++++++
test/app-tap/module_api.test.lua | 3 +-
test/app/fio.result | 103 ++++++++-----
test/app/fio.test.lua | 68 +++++----
test/app/msgpack.result | 7 +-
test/app/msgpack.test.lua | 5 +-
test/app/uuid.result | 2 +-
test/unit/luaT_tuple_new.c | 4 -
32 files changed, 901 insertions(+), 246 deletions(-)
create mode 100644 changelogs/unreleased/fix-ibuf-static.md
create mode 100644 src/cord_buf.c
create mode 100644 src/cord_buf.h
create mode 100755 test/app-tap/buffer.test.lua
create mode 100755 test/app-tap/gh-5632-gc-buf-reuse.test.lua
--
2.24.3 (Apple Git-128)
More information about the Tarantool-patches
mailing list