[dpdk-dev] [PATCH] eal: fix invalid memory read as reported by valgrind

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Jun 27 02:56:48 CEST 2014


2014-06-26 10:54, Aaron Campbell:
> ==29880== Invalid read of size 1
> ==29880==    at 0x56FF9A5: cpu_socket_id (eal_lcore.c:101)
> ==29880==    by 0x56FFAE9: rte_eal_cpu_init (eal_lcore.c:168)
> ==29880==    by 0x56F944A: rte_eal_init (eal.c:975)
> 
> The problem is that endptr points to memory allocated underneath the DIR
> handle, which has already been freed.  So move the closedir() call lower.
> 
> Signed-off-by: Aaron Campbell <aaron at arbor.net>

Good catch!

Acked-by: Thomas Monjalon <thomas.monjalon at 6wind.com>

Applied for version 1.7.0.

Thanks
-- 
Thomas


More information about the dev mailing list