From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 0203E445320 for ; Wed, 22 Jul 2020 12:57:12 +0300 (MSK) Date: Wed, 22 Jul 2020 12:46:53 +0300 From: Igor Munkin Message-ID: <20200722094653.GL18920@tarantool.org> References: <20200721223242.24467-1-i.kosarev@tarantool.org> <20200722085956.GA25532@tarantool.org> <1595411169.838162410@f334.i.mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1595411169.838162410@f334.i.mail.ru> Subject: Re: [Tarantool-patches] [PATCH v3] lua: assert in lua_gettop() in case of negative stack size List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ilya Kosarev Cc: tarantool-patches@dev.tarantool.org Ilya, On 22.07.20, Ilya Kosarev wrote: > > Hi! > > Thanks to @igormunkin we discovered more details of this problem. > Turns out we can see lua_State stored in port and it seems that > something is totally wrong here: it points to some function address > (port_lua_dump_16()). Thus I will make some more research into it and > this patch should be discarded for now. > (gdb) p ((struct port_lua *)port)->vtab > $19 = (const port_vtab *) 0x4e759f > (gdb) p ((struct port_lua *)port)->L > $20 = (lua_State *) 0x4e75c9 I've just noticed: port is a stucture, not a pointer, so the values are totally irrelevant. I guess you need something like this: | ((struct port_lua *)&port)->L Could you please share the results for the right dereference? >   >   > -- > Ilya Kosarev >   -- Best regards, IM