All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Huawei Xie <huawei.xie@intel.com>
Subject: Re: [PATCH] net/virtio: fix gcc6 i686 compiler error
Date: Mon, 11 Jul 2016 10:56:20 +0800	[thread overview]
Message-ID: <20160711025620.GV26521@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1467899348-31998-1-git-send-email-ferruh.yigit@intel.com>

On Thu, Jul 07, 2016 at 02:49:08PM +0100, Ferruh Yigit wrote:
> This is for target i686-native-linuxapp-gcc and gcc6,
> 
> Compilation error is:
> == Build drivers/net/virtio
>   CC virtio_rxtx_simple.o
> In file included from
> .../build/include/rte_mempool.h:77:0,
>                  from
> .../drivers/net/virtio/virtio_rxtx_simple.c:46:
> .../drivers/net/virtio/virtio_rxtx_simple.c: In
> function ‘virtio_xmit_pkts_simple’:
> .../build/include/rte_memcpy.h:551:2: error: array
> subscript is above array bounds [-Werror=array-bounds]
>   rte_mov16((uint8_t *)dst + 1 * 16, (const uint8_t *)src + 1 * 16);
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
...
> 
> The compiler traces the array all through the call stack and knows the
> size of array is 128 and generates a warning on above [1] which tries to
> access beyond byte 128.
> But unfortunately it ignores the "(size > 256)" check.
> 
> Giving a hint to compiler that variable "size" is related to the size of
> the source buffer fixes compiler warning.
> 
> Fixes: 863bfb474493 ("mempool: optimize copy in cache")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-virtio.

Thanks.

	--yliu

      reply	other threads:[~2016-07-11  2:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07 13:49 [PATCH] net/virtio: fix gcc6 i686 compiler error Ferruh Yigit
2016-07-11  2:56 ` Yuanhan Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160711025620.GV26521@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=huawei.xie@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.