From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 10705469710 for ; Mon, 8 Jun 2020 15:17:10 +0300 (MSK) Received: by mail-lj1-f193.google.com with SMTP id c17so20143932lji.11 for ; Mon, 08 Jun 2020 05:17:10 -0700 (PDT) Date: Mon, 8 Jun 2020 15:17:07 +0300 From: Cyrill Gorcunov Message-ID: <20200608121707.GA134822@grain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH 01/10] small: sanitized rlist and new region API List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org 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 Btw, the branch to be reviewed is gerold103/gh-4609-sanitize-alignment-full-ci