mem: poison memory when freed
authorStephen Hemminger <stephen@networkplumber.org>
Sat, 16 Feb 2019 01:50:16 +0000 (17:50 -0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 27 Mar 2019 09:53:41 +0000 (10:53 +0100)
commit24aa4f0fba9dfc644d92434f89ca9acab0b51188
tree61a4fa101379a0213af9d64d49f1d35bdf2131d9
parentcd6683331dced0c910cb850a6d8f9bcd784ca693
mem: poison memory when freed

DPDK malloc library allows broken programs to work because
the semantics of zmalloc and malloc are the same.

This patch enables a  more secure model which will catch
(and crash) programs that reuse memory already freed if
RTE_MALLOC_DEBUG is enabled.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/common/malloc_elem.c
lib/librte_eal/common/rte_malloc.c