Bug 1062 - GCC 12 build errors with --buildtype=debug
Summary: GCC 12 build errors with --buildtype=debug
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2022-08-04 11:17 CEST by Jerin
Modified: 2023-03-16 13:08 CET (History)
5 users (show)



Attachments

Description Jerin 2022-08-04 11:17:26 CEST
Reproducer:

meson --werror --buildtype=debug build
ninja -C build

gcc version:
gcc version 12.1.1 20220730 (GCC) (Archlinux)

Log:

../lib/eventdev/rte_event_eth_rx_adapter.c: In function ‘rxa_intr_ring_dequeue’:
../lib/eventdev/rte_event_eth_rx_adapter.c:1213:34: note: destination object ‘qd’ of size 8
 1213 |                 union queue_data qd  = rx_adapter->qd;
      |                                  ^~
In function ‘__rte_ring_dequeue_elems_128’,
    inlined from ‘__rte_ring_dequeue_elems’ at ../lib/ring/rte_ring_elem_pvt.h:262:3,
    inlined from ‘__rte_ring_do_hts_dequeue_elem’ at ../lib/ring/rte_ring_hts_elem_pvt.h:237:3,
    inlined from ‘rte_ring_mc_hts_dequeue_bulk_elem’ at ../lib/ring/rte_ring_hts.h:83:9,
    inlined from ‘rte_ring_dequeue_bulk_elem’ at ../lib/ring/rte_ring_elem.h:391:10,
    inlined from ‘rte_ring_dequeue_elem’ at ../lib/ring/rte_ring_elem.h:476:9,
    inlined from ‘rte_ring_dequeue’ at ../lib/ring/rte_ring.h:480:9,
    inlined from ‘rxa_intr_ring_dequeue’ at ../lib/eventdev/rte_event_eth_rx_adapter.c:1220:10:
../lib/ring/rte_ring_elem_pvt.h:234:25: error: ‘memcpy’ writing 32 bytes into a region of size 8 overflows the destination [-Werror=stringop-overflow=]
  234 |                         memcpy((void *)(obj + i), (void *)(ring + idx), 32);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/eventdev/rte_event_eth_rx_adapter.c: In function ‘rxa_intr_ring_dequeue’:
../lib/eventdev/rte_event_eth_rx_adapter.c:1213:34: note: destination object ‘qd’ of size 8
Comment 1 Kevin Traynor 2023-01-05 11:45:17 CET
Note, I squashed these and overead warnings with a workaround [1] for 21.11.3 as there is not yet a fix on main branch.

https://git.dpdk.org/dpdk-stable/commit/?h=21.11&id=e1d728588dc73af9ed60cc0074d51a7f24b2ba60

Note You need to log in before you can comment on or make changes to this bug.