[Tarantool-patches] [PATCH 01/10] small: sanitized rlist and new region API

Cyrill Gorcunov gorcunov at gmail.com
Mon Jun 8 15:17:07 MSK 2020


On Thu, May 21, 2020 at 10:37:23PM +0200, Vladislav Shpilevoy wrote:
> Rlist used a hack to implement offsetof() leading to crash under
> undefined behaviour clang sanitizer. It was fixed in this update.
> 
> Additionally, region_alloc_object() is changed to return the used
> size and a new macro region_alloc_array() is added. This small
> API change is supposed to simplify switching lots of region
> allocations to aligned versions in scope of #4609.
> 
> Part of #4609

So the size variable is only needed to write diag_set message.
A good candidate to be moved into small library itself. But I think
it should be addressed separately. Also sizeof() returns size_t
type, not int, but should not be a problem for us.

Reviewed-by: Cyrill Gorcunov <gorcunov at gmail.com>

Btw, the branch to be reviewed is

gerold103/gh-4609-sanitize-alignment-full-ci


More information about the Tarantool-patches mailing list