From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (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 EE5E9430409 for ; Tue, 18 Aug 2020 11:08:51 +0300 (MSK) Received: by mail-lf1-f65.google.com with SMTP id j22so9760189lfm.2 for ; Tue, 18 Aug 2020 01:08:51 -0700 (PDT) Date: Tue, 18 Aug 2020 11:08:47 +0300 From: Cyrill Gorcunov Message-ID: <20200818080847.GO2074@grain> References: <20200814211442.667099-1-gorcunov@gmail.com> <20200814211442.667099-8-gorcunov@gmail.com> <20200817124235.GJ2074@grain> <41e3fd4b-6d04-a5ab-3a6c-858929456ee9@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41e3fd4b-6d04-a5ab-3a6c-858929456ee9@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v7 7/8] applier: process synchro requests without txn engine List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tml On Mon, Aug 17, 2020 at 10:49:00PM +0200, Vladislav Shpilevoy wrote: > On 17.08.2020 14:42, Cyrill Gorcunov wrote: > > On Sat, Aug 15, 2020 at 05:06:05PM +0200, Vladislav Shpilevoy wrote: > >>> +static struct synchro_entry * > >>> +synchro_entry_new(struct applier *applier, > >>> + struct xrow_header *applier_row, > >>> + struct synchro_request *req) > >>> +{ > >>> + struct synchro_entry *entry; > >>> + size_t size = sizeof(*entry) + sizeof(struct xrow_header *); > >> > >> 6. Why don't you just add 'struct xrow_header*[1]' to the end of > >> struct synchro_entry? There is no a case, when the entry is needed > >> without the xrow_header pointer in the end. > > > > This is forbidden by asan and some other compilers we've in travis runs. > > I've been already trying. > > We use clang and gcc, just 2. To workaround that I suggest to add > -Wno-gnu-variable-sized-type-not-at-end to compiler.cmake (with that > flag it works, at least on clang - I need you to check it on gcc). I think this could be addressed later (if ever) -- we allocate an entry dinamically and we have similar thing in general xrow allocation, so in this POV at least they all are unified.