[PATCH] eal: fix cleanup on Windows
Morten Brørup
mb at smartsharesystems.com
Fri Nov 8 18:43:00 CET 2024
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Friday, 8 November 2024 17.01
>
> On Fri, 8 Nov 2024 14:08:21 +0100
> Thomas Monjalon <thomas at monjalon.net> wrote:
>
> > The memory allocated with _aligned_malloc()
> > must be released with _aligned_free() on Windows.
> >
> > The POSIX free() was called in eal_lcore_var_cleanup(),
> > called in rte_eal_cleanup(), and triggered a heap corruption:
> > exit status 3221226356 or signal 3221226228 SIGinvalid
> > with MALLOC_PERTURB_=86
> >
> > Fixes: 5bce9bed67ad ("eal: add static per-lcore memory allocation
> facility")
> >
> > Reported-by: David Marchand <david.marchand at redhat.com>
> > Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
>
> Is there anyway to use the function attributes to catch this at compile
> time (for Gcc builds).
I took a look at it, and it boils down to building for a Windows environment, where RTE_EXEC_ENV_WINDOWS is defined, and then the alloc function attributes are disabled.
More information about the dev
mailing list