From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D6E0AA00C5 for ; Sun, 13 Feb 2022 23:31:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA0AF410F6; Sun, 13 Feb 2022 23:31:33 +0100 (CET) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mails.dpdk.org (Postfix) with ESMTP id 3CF084068C; Sun, 13 Feb 2022 23:31:32 +0100 (CET) Received: by mail-pf1-f181.google.com with SMTP id l19so20247156pfu.2; Sun, 13 Feb 2022 14:31:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DhjlCLbIHQRDVhSKUYXH8XGS1c2yL5NmdQnVkv9frlk=; b=oo5Jf5WpKXt1kffic2r2+eq/99U+GGt2/73QsHr9OuzPmF6JrMEXbpl72fZEtPXFzt OsbgfeUhlljMNDO6jM7QwizuQqHn1v7Kc4Qdr0CKtU7lIcPGcmEKOH+FYGIl90JYbXMx tKEYoMxSjXqDxM6zURoLhTJaW2v1uDYo5oIAn/zg3hxjCDmOScYKuFRRwK24jpWscbQy Jd+sDWEVtL9zqc6o/y80ZPLWRe2ieEslTa9e8AFH42GCBhzzaO+wfNlW8HpYY+R8Devg kzF02zPYZfqzwyiqu9PqbhTa3eAIywNJa15vl0XUmKPer81BWhu0wjp5KH2iuzo5/5IH 8LqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DhjlCLbIHQRDVhSKUYXH8XGS1c2yL5NmdQnVkv9frlk=; b=eZJTc4H9tyxJgs51k2gPPGn6ZyOuINjBaorL34biGXBYvLnj2WqvKOdevhlhxPlQDi PbeYi5xpI2c2RdevosIBYXbHsuVJo9lgnxpxoGJHeNqdoifOUDV2azGt0Sg1P1LkUzGa b+Rhvx/bgo9uk0D/bJajh5mj+GtVz2G0kFWkCxIokBP6P2bqO53Lg1qTkVJk8uCT0C1z DcnWy8WAdPlhwo61sGfObu/NIgD8VvPwVb5YukswZZ5j7/KgAC6XFrRnIc1HVMjJ34ZF NrU6FmTteYah2pDQXtzB/mO+YNlPvTP3f0id7SgtX+6/0UWKd6G1O7vMr4IlJRzC2T3I +b3Q== X-Gm-Message-State: AOAM5314S75Rd7/cXPvMK+TA4XjVrjCB6wd3mgl7GiUthgM5yYn4iRJ7 M8+XHv90rMs8UmNm/2Gtis+HN8pNzc2J9g5n6cE= X-Google-Smtp-Source: ABdhPJyIam6uJ+/vyYCuQ9cKCuJcsBltbMmWbOT0qWcYRrsklZcII0erc9Z6ZaDU/ywvHGbkb5J94xkfvkQ+3FBs8MI= X-Received: by 2002:a63:698a:: with SMTP id e132mr9383249pgc.14.1644791491334; Sun, 13 Feb 2022 14:31:31 -0800 (PST) MIME-Version: 1.0 References: <20220115194102.444140-1-lucp.at.work@gmail.com> <20220117153711.32829-1-lucp.at.work@gmail.com> In-Reply-To: From: Luc Pelletier Date: Sun, 13 Feb 2022 17:31:19 -0500 Message-ID: Subject: Re: [PATCH v5] eal: fix unaligned loads/stores in rte_memcpy_generic To: "Ananyev, Konstantin" Cc: "Richardson, Bruce" , "dev@dpdk.org" , "Li, Xiaoyun" , "stable@dpdk.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi Konstantin, > Indeed it looks like a problem. > Thanks for pointing it out. > Was able to reproduce it with gcc 11 (clang 13 seems fine). > Actually, adding ' __attribute__ ((__may_alias__))' for both dst and src > didn't quire the problem. __may_alias__ works if it's applied to a typedef, see the following for a modified version of my original example that works and uses __may_alias__: https://godbolt.org/z/W83zzoePq The documentation I found for __may_alias__ is quite sparse, so I'm a little wary of assuming it'll always work. I'm hoping someone with more experience with the attribute would be able to add more confidence to the assumption that it'll work in all cases.