From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp31.i.mail.ru (smtp31.i.mail.ru [94.100.177.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1EAA5469710 for ; Thu, 28 May 2020 23:20:37 +0300 (MSK) From: "Timur Safin" References: <5921ba4ecb59842c6999eff24ef5f832ac853765.1590622225.git.v.shpilevoy@tarantool.org> In-Reply-To: <5921ba4ecb59842c6999eff24ef5f832ac853765.1590622225.git.v.shpilevoy@tarantool.org> Date: Thu, 28 May 2020 23:20:33 +0300 Message-ID: <049701d6352d$712c08c0$53841a40$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Tarantool-patches] [PATCH v2 10/10] xrow: use unaligned store operation in xrow_to_iovec() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Vladislav Shpilevoy' , tarantool-patches@dev.tarantool.org, alyapunov@tarantool.org, korablev@tarantool.org Indeed! LGTM : -----Original Message----- : From: Vladislav Shpilevoy : Sent: Thursday, May 28, 2020 2:32 AM : To: tarantool-patches@dev.tarantool.org; alyapunov@tarantool.org; : korablev@tarantool.org; tsafin@tarantool.org : Subject: [PATCH v2 10/10] xrow: use unaligned store operation in : xrow_to_iovec() : : xrow_to_iovec() tried to save a uint32_t value by a not aligned : address. The patch makes it use a special operation for that : instead of regular assignment. : : Part of #4609 : --- : src/box/xrow.c | 2 +- : 1 file changed, 1 insertion(+), 1 deletion(-) : : diff --git a/src/box/xrow.c b/src/box/xrow.c : index 06473a8bc..bb64864b2 100644 : --- a/src/box/xrow.c : +++ b/src/box/xrow.c : @@ -892,7 +892,7 @@ xrow_to_iovec(const struct xrow_header *row, struct : iovec *out) : /* Encode length */ : char *data = (char *) out[0].iov_base; : *(data++) = 0xce; /* MP_UINT32 */ : - *(uint32_t *) data = mp_bswap_u32(len); : + store_u32(data, mp_bswap_u32(len)); : : assert(iovcnt <= XROW_IOVMAX); : return iovcnt; : -- : 2.21.1 (Apple Git-122.3)