From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 0/5] Static buf in Lua, part 3
Date: Wed, 28 Jul 2021 00:39:36 +0300 [thread overview]
Message-ID: <YQB9GBAs5O/Vcp8b@grain> (raw)
In-Reply-To: <cover.1627420835.git.v.shpilevoy@tarantool.org>
On Tue, Jul 27, 2021 at 11:24:10PM +0200, Vladislav Shpilevoy wrote:
> Here we go again.
>
> I see that Lua UUID helpers have L suffix and decimal helpers do not. Have no
> idea why, but decided not to change it here since it is not related to the patch
> goal.
>
> I validated other usages of tt_uuid_str(), decimal_str(), tt_sprintf(),
> tt_statuc_buf(), tuple_str(), mp_str() and some others - they all seem to be
> fine now. But you can never say for sure.
>
> Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-6259-static_buf-part3
> Issue: https://github.com/tarantool/tarantool/issues/6259
As to me the helpers
inline void
tt_uuid_to_string(const struct tt_uuid *uu, char *out)
{
snprintf(out, UUID_STR_LEN + 1,
"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
uu->time_low, uu->time_mid, uu->time_hi_and_version,
uu->clock_seq_hi_and_reserved, uu->clock_seq_low, uu->node[0],
uu->node[1], uu->node[2], uu->node[3], uu->node[4], uu->node[5]);
}
should had been banned from the begining, length of output buffer
must be explicitly passed instead, ie
buf[UUID_STR_LEN+1];
tt_uuid_to_string(uu, buf, sizeof(buf));
but this is obviously unrelated to the series itself just wonder who
ever came up with such api at all, since it is just a bug lurking
around waiting to zap the caller's stack.
The series is good, thanks Vlad! Ack.
next prev parent reply other threads:[~2021-07-27 21:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 21:24 Vladislav Shpilevoy via Tarantool-patches
2021-07-27 21:24 ` [Tarantool-patches] [PATCH 1/5] uuid: introduce and use luaL_pushuuidstr() Vladislav Shpilevoy via Tarantool-patches
2021-07-29 11:30 ` Sergey Ostanevich via Tarantool-patches
2021-07-27 21:24 ` [Tarantool-patches] [PATCH 2/5] info: use luaL_pushuuidstr() for box.info uuids Vladislav Shpilevoy via Tarantool-patches
2021-07-29 11:38 ` Sergey Ostanevich via Tarantool-patches
2021-08-01 15:03 ` Vladislav Shpilevoy via Tarantool-patches
2021-08-01 17:01 ` Sergey Ostanevich via Tarantool-patches
2021-07-27 21:24 ` [Tarantool-patches] [PATCH 3/5] decimal: rename decimal_to_string to decimal_str Vladislav Shpilevoy via Tarantool-patches
2021-07-29 11:41 ` Sergey Ostanevich via Tarantool-patches
2021-08-01 15:03 ` Vladislav Shpilevoy via Tarantool-patches
2021-08-01 17:01 ` Sergey Ostanevich via Tarantool-patches
2021-07-27 21:24 ` [Tarantool-patches] [PATCH 4/5] decimal: introduce decimal_to_string Vladislav Shpilevoy via Tarantool-patches
2021-07-29 11:52 ` Sergey Ostanevich via Tarantool-patches
2021-08-01 15:04 ` Vladislav Shpilevoy via Tarantool-patches
2021-08-01 17:06 ` Sergey Ostanevich via Tarantool-patches
2021-07-27 21:24 ` [Tarantool-patches] [PATCH 5/5] decimal: introduce and use lua_pushdecimalstr() Vladislav Shpilevoy via Tarantool-patches
2021-07-29 12:28 ` Sergey Ostanevich via Tarantool-patches
2021-08-01 15:04 ` Vladislav Shpilevoy via Tarantool-patches
2021-07-27 21:39 ` Cyrill Gorcunov via Tarantool-patches [this message]
2021-08-02 19:45 ` [Tarantool-patches] [PATCH 0/5] Static buf in Lua, part 3 Vladislav Shpilevoy via Tarantool-patches
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=YQB9GBAs5O/Vcp8b@grain \
--to=tarantool-patches@dev.tarantool.org \
--cc=gorcunov@gmail.com \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 0/5] Static buf in Lua, part 3' \
/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