[dpdk-dev] [dpdk-stable] [PATCH v2 1/4] raw/skeleton: fix failing test case

Thomas Monjalon thomas at monjalon.net
Mon Jul 1 20:03:23 CEST 2019


21/06/2019 17:56, Bruce Richardson:
> Rawdev unit test for setting and getting parameters is failing because
> of a pointer value being dereferenced after the memory it pointed to is
> freed.
> 
> The freeing of the malloced memory is difficult when using asserts to
> cause early abort of the test cases, since that can leak memory. The
> original placement of the free call caused a memory leak if the test
> finished early, while a fix for that leak caused the test to fail at
> times due to the memory variable being referenced after free. For a case
> like this, using stack rather than heap memory is just easier and avoids
> all issues.
> 
> Fixes: 55ca1b0f2151 ("raw/skeleton: add test cases")
> Fixes: 88d0e47880ec ("raw/skeleton: fix memory leak on test failure")
> Cc: shreyansh.jain at nxp.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>

This test is already fixed by another patch:
http://git.dpdk.org/dpdk/commit/?id=dcb1595956





More information about the dev mailing list