> From: Stephen Hemminger [mailto:[email protected]] > Sent: Friday, 8 November 2024 17.01 > > On Fri, 8 Nov 2024 14:08:21 +0100 > Thomas Monjalon <[email protected]> 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 <[email protected]> > > Signed-off-by: Thomas Monjalon <[email protected]> > > 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.

