[dpdk-stable] [PATCH v11 4/4] performance-thread: Fix cross compilation failed

Bruce Richardson bruce.richardson at intel.com
Tue Oct 19 12:37:40 CEST 2021


On Tue, Oct 19, 2021 at 06:12:07PM +0800, zhihongx.peng at intel.com wrote:
> From: Zhihong Peng <zhihongx.peng at intel.com>
> 
> The gcc(arm-linux-gcc) will check code more stricter when ASan enabled.
> "strncpy specified bound XX equals destination size" error occurs here.
> 
> Fixes: 116819b9ed0d ("examples/performance-thread: add lthread subsystem")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Xueqin Lin <xueqin.lin at intel.com>
> Signed-off-by: Zhihong Peng <zhihongx.peng at intel.com>
> ---
> v11: Use rte_strlcpy to replace strncpy.
> ---

+1 to using strlcpy, but it should be "strlcpy" rather than "rte_strlcpy"
which should be used. Analysis tools are likely to be familiar with strlcpy
but won't know the DPDK-specific version of it.

With that change to remove the rte_ prefix

Acked-by: Bruce Richardson <bruce.richardson at intel.com>

/Bruce


More information about the stable mailing list