On 12/20/22 14:14, Eelco Chaudron wrote:
> 
> 
> On 20 Dec 2022, at 14:06, David Marchand wrote:
> 
>> On Tue, Dec 20, 2022 at 2:01 PM Eelco Chaudron <echau...@redhat.com> wrote:
>>> I have problems building this on my fedora35 system with 
>>> gcc-11.3.1-3.fc35.x86_64:
>>>
>>> libtool: link: ( cd "include/openvswitch/.libs" && rm -f "libcxxtest.la" && 
>>> ln -s "../libcxxtest.la" "libcxxtest.la" )
>>> In file included from lib/netdev-linux-private.h:30,
>>>                  from lib/netdev-afxdp.c:19:
>>> In function ‘dp_packet_delete’,
>>>     inlined from ‘dp_packet_delete’ at lib/dp-packet.h:246:1,
>>>     inlined from ‘dp_packet_batch_add__’ at lib/dp-packet.h:775:9,
>>>     inlined from ‘dp_packet_batch_add’ at lib/dp-packet.h:783:5,
>>>     inlined from ‘netdev_afxdp_rxq_recv’ at lib/netdev-afxdp.c:894:9:
>>> lib/dp-packet.h:260:9: error: ‘free’ called on pointer ‘*umem.xpool.array’ 
>>> with nonzero offset [8, 2558044588346441168] [-Werror=free-nonheap-object]
>>>   260 |         free(b);
>>>       |         ^~~~~~~
>>>
>>> Guess it does not recognise the (b->source == DPBUF_AFXDP) statement…
>>>
>>> This is my build config:
>>>
>>> ./configure --enable-Werror --enable-usdt-probes --localstatedir=/var 
>>> --prefix=/usr --sysconfdir=/etc --enable-afxdp
>>>
>>> Guess this should be fixed before we enable afxdp by default?
>>
>> Same for me.
>> I have been scratching my head over this report... I wonder if this is
>> a compiler bug.
> 
> I guess the compiler does not understand that we will always call 
> dp_packet_delete() with the source being DPBUF_AFXDP, and don’t hit the 
> free().
> Guess we should probably disable the warning in this specific code path.
> 
> //Eelco
> 

Meanwhile I opened a GCC bug:
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108187

There are few similar issues in the tracker, so it might
make sense disabling the warning.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to