From: Igor Munkin <imun@tarantool.org> To: Alexander Turenko <alexander.turenko@tarantool.org> Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v2 1/3] merger: fix NULL dereference when called via iproto Date: Fri, 17 Jul 2020 01:44:51 +0300 [thread overview] Message-ID: <20200716224451.GD18920@tarantool.org> (raw) In-Reply-To: <20200716214249.GA18920@tarantool.org> Sasha, This patch is also LGTM, except the single comment below. On 17.07.20, Igor Munkin wrote: <snipped> > > > > I reformatted the comment a bit to make it more clear: > > > > | /* > > | * Unlike lua_newthread(), luaT_newthread() does not leave > > | * the new Lua state on tarantool_L. > > I was around to it today and unfortunately it does[1]. So you need to > explicitly pop a newly created coroutine from the guest stack right > after anchoring it to the registry. As you mentioned in offline discussion there is an implicit pop underneath <luaL_ref> routine, so the implementation is fine and only this misleading comment need to be fixed. > > > | * > > | * It is desired behaviour here, because of two reasons. > > | * > > | * First, if we'll push something to tarantool_L and > > | * yield, then another fiber will not know that a stack > > | * top is changed and may operate on a wrong slot. > > | * > > | * Second, many requests that push a value to tarantool_L > > | * and yield may exhaust available slots on the stack. It > > | * is limited by LUAI_MAXSTACK build time constant (~65K). > > | */ <snipped> > > -- > Best regards, > IM -- Best regards, IM
next prev parent reply other threads:[~2020-07-16 22:55 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-17 21:06 [Tarantool-patches] [PATCH v2 0/3] Merger's NULL defererence Alexander Turenko 2020-06-17 21:06 ` [Tarantool-patches] [PATCH v2 1/3] merger: fix NULL dereference when called via iproto Alexander Turenko 2020-06-18 22:48 ` Vladislav Shpilevoy 2020-06-19 8:50 ` Alexander Turenko 2020-06-19 23:32 ` Vladislav Shpilevoy 2020-06-21 18:28 ` Alexander Turenko 2020-07-01 20:36 ` Igor Munkin 2020-07-16 20:10 ` Alexander Turenko 2020-07-16 21:42 ` Igor Munkin 2020-07-16 22:44 ` Igor Munkin [this message] 2020-07-17 3:08 ` Alexander Turenko 2020-06-17 21:06 ` [Tarantool-patches] [PATCH v2 2/3] merger: clean fiber-local Lua stack after next() Alexander Turenko 2020-06-19 8:50 ` Alexander Turenko 2020-07-01 20:36 ` Igor Munkin 2020-07-16 20:11 ` Alexander Turenko 2020-07-16 22:07 ` Igor Munkin 2020-07-17 3:08 ` Alexander Turenko 2020-06-17 21:06 ` [Tarantool-patches] [PATCH v2 3/3] lua: expose temporary Lua state for iproto calls Alexander Turenko 2020-07-01 20:37 ` Igor Munkin 2020-07-16 20:11 ` Alexander Turenko 2020-07-16 22:33 ` Igor Munkin 2020-07-17 3:09 ` Alexander Turenko 2020-06-22 20:38 ` [Tarantool-patches] [PATCH v2 0/3] Merger's NULL defererence Vladislav Shpilevoy 2020-07-17 11:28 ` Alexander Turenko
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=20200716224451.GD18920@tarantool.org \ --to=imun@tarantool.org \ --cc=alexander.turenko@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v2 1/3] merger: fix NULL dereference when called via iproto' \ /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