[Tarantool-patches] [PATCH v3] lua: assert in lua_gettop() in case of negative stack size

Ilya Kosarev i.kosarev at tarantool.org
Wed Jul 22 13:25:07 MSK 2020


Right, error fixed and now we found more details. Now the best
assumption is that lua_State is somehow being broken by
user-called function (which name we now know).
Now we will look into user code. 
>Среда, 22 июля 2020, 12:56 +03:00 от Igor Munkin <imun at 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 <port_lua_dump>
>> (gdb) p ((struct port_lua *)port)->L
>> $20 = (lua_State *) 0x4e75c9 <port_lua_dump_16>
>
>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?
>
>>  
>
><snipped>
>
>>  
>> --
>> Ilya Kosarev
>>  
>
>--
>Best regards,
>IM 
 
 
--
Ilya Kosarev
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20200722/30f4393d/attachment.html>


More information about the Tarantool-patches mailing list