From: "Ilya Kosarev" <i.kosarev@tarantool.org>
To: "Igor Munkin" <imun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v3] lua: assert in lua_gettop() in case of negative stack size
Date: Wed, 22 Jul 2020 13:25:07 +0300 [thread overview]
Message-ID: <1595413507.397395465@f430.i.mail.ru> (raw)
In-Reply-To: <20200722094653.GL18920@tarantool.org>
[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]
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@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
[-- Attachment #2: Type: text/html, Size: 1839 bytes --]
next prev parent reply other threads:[~2020-07-22 10:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 22:32 Ilya Kosarev
2020-07-22 8:59 ` Nikita Pettik
2020-07-22 9:46 ` Ilya Kosarev
2020-07-22 9:46 ` Igor Munkin
2020-07-22 10:25 ` Ilya Kosarev [this message]
2020-07-22 10:47 ` Igor Munkin
2020-07-22 11:08 ` Nikita Pettik
2020-07-22 12:05 ` Igor Munkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1595413507.397395465@f430.i.mail.ru \
--to=i.kosarev@tarantool.org \
--cc=imun@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v3] lua: assert in lua_gettop() in case of negative stack size' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox