From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 57C15469710 for ; Mon, 1 Jun 2020 21:10:34 +0300 (MSK) From: Alexander Turenko Date: Mon, 1 Jun 2020 21:10:10 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 0/3] Merger's NULL defererence List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org, Alexander Turenko 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