From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH small 1/1] rlist: use built-in offsetof() when possible
Date: Wed, 13 May 2020 10:39:00 +0300 [thread overview]
Message-ID: <20200513073900.GJ2219@grain> (raw)
In-Reply-To: <4a2553507fcf643e1e5bae0753d95ee4ff7d4253.1589325991.git.v.shpilevoy@tarantool.org>
On Wed, May 13, 2020 at 01:27:25AM +0200, Vladislav Shpilevoy wrote:
> Rlist implemented its own offsetof() as a classic NULL
> pointer cast to the target type with taking address of
> the member. So it turned into NULL + member offset.
>
> But appeared undefined behaviour clang sanitizer is
> not friendly to this hack.
>
> The patch makes rlist define its own offsetof only as
> a last resort.
>
> Part of https://github.com/tarantool/tarantool/issues/4609
I think one day we should gather all such tricks and helpers
into compiler.h. Still while we didn't yet
Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>
thanks!
next prev parent reply other threads:[~2020-05-13 7:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 23:27 Vladislav Shpilevoy
2020-05-12 23:45 ` Timur Safin
2020-05-13 7:39 ` Cyrill Gorcunov [this message]
2020-05-13 22:21 ` Vladislav Shpilevoy
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=20200513073900.GJ2219@grain \
--to=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH small 1/1] rlist: use built-in offsetof() when possible' \
/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