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 00A63A0A0A for ; Tue, 18 May 2021 11:29:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EADB1410FF; Tue, 18 May 2021 11:29:24 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 6D59E4068E for ; Tue, 18 May 2021 11:29:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621330162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sFb90Adjmj4zZ9AQAQKM0m5ZykhoQA8xEOwzEomfFXY=; b=AGujhPFgeEJZmWbmTdZEW8PK+QUCqZasDZvvSjvt8mpEJhHSw70c7HkfQ0cRRdTOigQT1T tnTJDpvCqZ9WxzpRjDvnjVOdKO8VOvDH8C6N429sWQEPic5JxYKdCRvQ2aKDcpVXSMKVRT RGW7knvyAl6Ib4JS9Ca1HChW8vOcPhI= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-475-H42Z4TD6NKa9vNOufJDjSA-1; Tue, 18 May 2021 05:29:20 -0400 X-MC-Unique: H42Z4TD6NKa9vNOufJDjSA-1 Received: by mail-wr1-f71.google.com with SMTP id 93-20020adf80e60000b0290106fab45006so5304511wrl.20 for ; Tue, 18 May 2021 02:29:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sFb90Adjmj4zZ9AQAQKM0m5ZykhoQA8xEOwzEomfFXY=; b=NUmiVLHuJ3cnWhMWRn1wHZu8lP6kRnRLMqJ37TBuJomjnfgxde3l2XTYsTn+aab+ir Nd++Ry6cwQdoMXQBqV/0ZkP9JuKSVe0K5zo7pX3IFZ7Aeh3Px5yYqL+Kd3pZ+mOrj06h JeZd6jGJGXs6Kb/fjspqqNqr7AI5/49dLYOxE8JlciYMirHHEfvnPeKmp1Dwr0xlWjoe R1tJwc7+rPWZI0I4KL3vYeaBVntoQgrwRjJeFLRjgvX+vlPfR7+8jZtJO9viMvF6mtuZ Xxr71Hl7ns7VCG1WCFVjN/7KT6gxPgz+XAzablzKQVvHWHPDitAYPVco4KB/bZ/m222z vgZw== X-Gm-Message-State: AOAM531Bbq//Sle17I33mxDMlSHjXBLDzpYX286EpUY79hNCHUhGL/oc MCX3tyRukD+13ITy2hteXQ5GcErD5vBei8EfOpUMvvjUKE8GkgrCLcfeW+p7RsFch7N2THvnWBv BMVEE/TQstAYIBNp3dG6hSibyFEQPV2mQOZUnw0bh3WpjsRW8rtpUHLIMFDQ= X-Received: by 2002:a05:600c:4f93:: with SMTP id n19mr3890667wmq.100.1621330159504; Tue, 18 May 2021 02:29:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKFjvLfxrP2GVmrCBf1gM555Axv7q32PbQee7hPqurf9BwCrp8K9YYaGF60IeqewpBzGvxSw== X-Received: by 2002:a05:600c:4f93:: with SMTP id n19mr3890647wmq.100.1621330159276; Tue, 18 May 2021 02:29:19 -0700 (PDT) Received: from [192.168.0.36] ([78.18.27.43]) by smtp.gmail.com with ESMTPSA id v10sm23783598wrq.0.2021.05.18.02.29.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 May 2021 02:29:18 -0700 (PDT) To: Thomas Monjalon , Ferruh Yigit Cc: Cristian Dumitrescu , Pablo de Lara Guarch , dev@dpdk.org, stable@dpdk.org References: <20210517155739.800371-1-ferruh.yigit@intel.com> <16891120.zO6uBrY9Ry@thomas> From: Kevin Traynor Message-ID: <635e6994-2234-f97e-9b42-3464374805de@redhat.com> Date: Tue, 18 May 2021 10:29:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <16891120.zO6uBrY9Ry@thomas> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] test/table: fix build with GCC 11 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 Sender: "stable" On 18/05/2021 09:55, Thomas Monjalon wrote: > 17/05/2021 17:57, Ferruh Yigit: >> Build error: >> ../app/test/test_table_tables.c: In function ‘test_table_stub’: >> ../app/test/test_table_tables.c:31:9: >> warning: ‘memset’ offset [0, 31] is out of the bounds [0, 0] >> [-Warray-bounds] >> memset((uint8_t *)mbuf + sizeof(struct rte_mbuf) + 32, 0, 32); \ >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> ../app/test/test_table_tables.c:151:25: >> note: in expansion of macro ‘PREPARE_PACKET’ >> 151 | PREPARE_PACKET(mbufs[i], 0xadadadad); >> | ^~~~~~~~~~~~~~ >> >> 'key' points to mbuf header + 32 bytes, and memset clears next 32 bytes >> of 'key', so overall there needs to be 64 bytes after mbuf header. >> Adding a mbuf size check before memset. >> >> The original code has an assumption that mbuf data buffer follows mbuf >> header, this patch accepts same assumption. >> >> Bugzilla ID: 677 >> Fixes: 5205954791cb ("app/test: packet framework unit tests") >> Cc: stable@dpdk.org >> >> Signed-off-by: Ferruh Yigit >> --- >> Cc: cristian.dumitrescu@intel.com >> Cc: Kevin Traynor >> >> Not exactly clear why compiler complains about, compiler can't know the >> bounds of the memory we try to memset here. >> But adding a size check seems logic thing to do also fixes the compiler >> warning. > > Applied, thanks > Was just testing this. fwiw, passing build on F34/gcc11 and LGTM. > >