[dpdk-stable] [dpdk-dev] [PATCH] eal: fix unitialized data warning

David Marchand david.marchand at redhat.com
Wed Dec 4 13:31:11 CET 2019


On Wed, Dec 4, 2019 at 1:17 PM Andrew Rybchenko
<arybchenko at solarflare.com> wrote:
>
> On 12/4/19 2:12 PM, David Marchand wrote:
> > Fixed title s/unitialized/uninitialized/
> >
> > On Wed, Nov 27, 2019 at 11:32 PM Stephen Hemminger
> > <stephen at networkplumber.org> wrote:
> >>
> >> Valgrind reports that eal interrupt thread is calling epoll_ctl
> >> with uninitialized data.  Trivial to fix by initializing it.
> >
> > Added a note on it being a Valgrind false positive.
> >
> >
> >> Fixes: af75078fece3 ("first public release")
> >> Cc: stable at dpdk.org
> >
> >> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> > Acked-by: David Marchand <david.marchand at redhat.com>
> >
> > Applied, thanks.
>
> It breaks build on RHEL 7.6 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36):
>
> lib/librte_eal/linux/eal/eal_interrupts.c: In function
> ‘eal_intr_thread_main’:
> lib/librte_eal/linux/eal/eal_interrupts.c:1048:9: error: missing
> initializer for field ‘events’ of ‘struct epoll_event’
> [-Werror=missing-field-initializers]
>    struct epoll_event ev = { };
>           ^
> In file included from lib/librte_eal/linu/eal/eal_interrupts.c:15:0:
> /usr/include/sys/epoll.h:89:12: note: ‘events’ declared here
>     uint32_t events; /* Epoll events */
>              ^

Erf, indeed, I ran the tests on a different system than my laptop...
Need more coffee, those initializers are always a pain.
I'll go with a memset.

Best first commit for a release, I suppose.


--
David Marchand



More information about the stable mailing list