https://bugs.dpdk.org/show_bug.cgi?id=1195

            Bug ID: 1195
           Summary: Building DPDK with gcc 12 Generates stringop-overflow
                    warnings on RHEL 8.7
           Product: DPDK
           Version: 23.03
          Hardware: POWER
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: dev@dpdk.org
          Reporter: d...@linux.vnet.ibm.com
  Target Milestone: ---

Building DPDK 23.03-rc3 on ppc64le systems with RHEL 8.7 and gcc-toolset-12
(gcc v12.2.1) generates stringop-overflow overflow warnings:

[1641/2397] Compiling C object
drivers/libtmp_rte_net_tap.a.p/net_tap_rte_eth_tap.c.o
In function ‘parse_user_mac’,
    inlined from ‘set_mac_type’ at ../drivers/net/tap/rte_eth_tap.c:2314:6:
../drivers/net/tap/rte_eth_tap.c:2286:47: warning: writing 1 byte into a region
of size 0 [-Wstringop-overflow=]
 2286 |                 user_mac->addr_bytes[index++] = strtoul(mac_byte, NULL,
16);
      |                
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../lib/ethdev/rte_eth_ctrl.h:10,
                 from ../lib/ethdev/rte_ethdev.h:1421,
                 from ../lib/ethdev/ethdev_driver.h:24,
                 from ../drivers/net/tap/rte_eth_tap.c:10:
../lib/net/rte_ether.h: In function ‘set_mac_type’:
../lib/net/rte_ether.h:61:17: note: at offset 6 into destination object
‘addr_bytes’ of size 6
   61 |         uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]; /**< Addr bytes in tx
order */
      |                 ^~~~~~~~~~

Warning is not observed when building on an x86_64 system with RHEL 8.7 and
gcc-toolset-12.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to