[Tarantool-patches] [PATCH 0/3] Merger's NULL defererence

Alexander Turenko alexander.turenko at tarantool.org
Mon Jun 1 21:10:10 MSK 2020


The first patch is a bunch of renames: I dropped luaL prefix from
several functions to highlight the contract: they can be called from
usual C code, w/o any requirements to pass or to place a Lua state
somewhere.

The second patch just fixes NULL pointer dereference that occurs due to
the wrong assumption: I did think that fiber().storage.lua.stack is
always exists and non-NULL.

The third commit is the optimization: it allows to don't create a new
Lua state in merger when possible.

https://github.com/tarantool/tarantool/issues/4954
Totktonada/gh-4954-fix-merger-segfault-full-ci

Alexander Turenko (3):
  merger: drop luaL prefix where contract allows it
  merger: fix NULL dereference when called via iproto
  lua: expose temporary Lua state for iproto calls

 src/box/lua/call.c                            |  27 ++
 src/box/lua/merger.c                          | 233 ++++++++++++++----
 src/lib/core/fiber.h                          |   8 +-
 .../gh-4954-merger-via-net-box.test.lua       | 129 ++++++++++
 4 files changed, 349 insertions(+), 48 deletions(-)
 create mode 100755 test/box-tap/gh-4954-merger-via-net-box.test.lua

-- 
2.25.0



More information about the Tarantool-patches mailing list