Skip to contentSkip to conversation

net/bnxt build failure with LTO enabled

DPDK/ethdev Bug 1710 [email protected] 1 participant 2 messages May 21, 2025 – Jan 19

lore
Share & tools
lore
#0 lore raw

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

Bug ID: 1710
Summary: net/bnxt build failure with LTO enabled
Product: DPDK
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---

3472/3591] Linking target drivers/librte_net_bnxt.so.25.2
In function ‘tfo_open’,
inlined from ‘tfc_open’ at ../drivers/net/bnxt/tf_core/v3/tfc_init.c:34:2, inlined from ‘ulp_tfc_ctx_attach’ at
../drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c:783:7:
../drivers/net/bnxt/tf_core/v3/tfo.c:108:17: warning: ‘rte_free’ called on pointer ‘bp_44(D)’ with nonzero offset 800 [-Wfree-nonheap-object]

  108 |                 rte_free(tfo);
      |                 ^

In function ‘tfo_open’,
inlined from ‘tfc_open’ at ../drivers/net/bnxt/tf_core/v3/tfc_init.c:34:2, inlined from ‘ulp_tfc_init’ at
../drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c:957:7:
../drivers/net/bnxt/tf_core/v3/tfo.c:108:17: warning: ‘rte_free’ called on pointer ‘bp_74(D)’ with nonzero offset 800 [-Wfree-nonheap-object]

  108 |                 rte_free(tfo);
      |                 ^
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

http://bugs.dpdk.org/show_bug.cgi?id=1710

Stephen Hemminger ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Stephen Hemminger ([email protected]) --- Fixed by

commit 49b1673ec6693a673b4dc07984023f481cce4d96

Author: Stephen Hemminger <[email protected]>
Date:   Wed May 21 12:37:27 2025 -0700

net/bnxt: fix free of not allocated object

This was found as error when compiling with LTO. The function allocates new data with rte_zmalloc and then stores pointer in the pointer-to-pointer passed as argument. In the unwind case, it would call rte_free() with wrong one.

Fixes 80317ff6adfd ("net/bnxt/tf_core: support Thor2")
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.