[Tarantool-patches] [PATCH v3] lua: assert in lua_gettop() in case of negative stack size
Igor Munkin
imun at tarantool.org
Wed Jul 22 12:46:53 MSK 2020
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
More information about the Tarantool-patches
mailing list