From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (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 4B2A5469719 for ; Thu, 24 Sep 2020 14:31:57 +0300 (MSK) Date: Thu, 24 Sep 2020 14:31:35 +0300 From: Sergey Kaplun Message-ID: <20200924113135.GB7363@root> References: <20200921174837.30681-1-skaplun@tarantool.org> <20200923231619.samgq6wp44dhjjdp@tkn_work_nb> <20200924093254.dhm4hzlerfwftfkn@tkn_work_nb> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200924093254.dhm4hzlerfwftfkn@tkn_work_nb> Subject: Re: [Tarantool-patches] [PATCH] cppcheck: src/lua/fiber.c null pointer dereference List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org On 24.09.20, Alexander Turenko wrote: > On Thu, Sep 24, 2020 at 02:16:20AM +0300, Alexander Turenko wrote: > > Moved to https://github.com/tarantool/tarantool/issues/5326 I've added comment about this behaviour: ``` diff --git a/src/lua/fiber.c b/src/lua/fiber.c index 1c7d9cdb6..efb0a4921 100644 --- a/src/lua/fiber.c +++ b/src/lua/fiber.c @@ -214,6 +214,11 @@ fiber_backtrace_cb(int frameno, void *frameret, const char *func, size_t offset, { struct lua_fiber_tb_ctx *tb_ctx = (struct lua_fiber_tb_ctx *)cb_ctx; struct lua_State *L = tb_ctx->L; + /* + * There is impossible to get func == NULL until + * https://github.com/tarantool/tarantool/issues/5326 + * will not resolved, but is possible afterwards. + */ if (func != NULL && strstr(func, "lj_BC_FUNCC") == func) { /* We are in the LUA vm. */ lua_Debug ar; ``` You can see other fixes in [1] [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-September/019636.html -- Best regards, Sergey Kaplun