On 10/20/26 11:49 AM, Morten Brørup wrote:

On architectures where rte_memcpy() is defined as memcpy(),
GCC warns about source/destination overflow when copying more than the
source/destination size, even for code paths that are not taken in cases
where the sizes are smaller.

The relevant compiler warnings were disabled for GCC at the two
occurrences, and comments describing the reason were added.

NB:
It has not been investigated which GCC versions are affected.
GCC version 10 and up was chosen because that was what the previous
versions of x86 rte_memcpy() disabled sligthly similar warnings for.

PS:
The alternative was to obfuscate the code, but that would make the code
less readable, and might have unintended effects on architectures and
compilers not suffering by this issue.

Bugzilla ID: 2061
Fixes: ee0822a0ef41 ("stack: introduce pile")

The pile was introduce with this DPDK release, so no need to backport.

Reported-by: Ali Alnubani <[email protected]>
Signed-off-by: Morten Brørup <[email protected]>
---

Build passes with this patch.

Tested-by: Ali Alnubani <[email protected]>

Thanks,
Ali

Reply via email to