[ovs-dev] [PATCH] tests: Add track-origins flag to valgrind.
William Tu
u9012063 at gmail.com
Tue Sep 3 20:46:12 UTC 2019
On Tue, Sep 03, 2019 at 06:07:26PM +0300, Ilya Maximets wrote:
> Useful for tracking where the uninitialized memory came from.
> Report example:
>
> Thread 13 revalidator11:
> Conditional jump or move depends on uninitialised value(s)
> at 0x4C35D96: __memcmp_sse4_1 (in vgpreload_memcheck.so)
> by 0x9D4404: ofpbuf_equal (ofpbuf.h:273)
> by 0x9D4404: revalidate_ukey__ (ofproto-dpif-upcall.c:2219)
> <...>
> by 0x6AF488E: clone (clone.S:95)
> Uninitialised value was created by a stack allocation
> at 0x9D4450: compose_slow_path (ofproto-dpif-upcall.c:1062)
>
> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
> ---
Looks good to me.
Tested-by: William Tu <u9012063 at gmail.com>
> tests/automake.mk | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/automake.mk b/tests/automake.mk
> index d6ab51732..908eb6666 100644
> --- a/tests/automake.mk
> +++ b/tests/automake.mk
> @@ -264,7 +264,8 @@ $(valgrind_wrappers): tests/valgrind-wrapper.in
> CLEANFILES += $(valgrind_wrappers)
> EXTRA_DIST += tests/valgrind-wrapper.in
>
> -VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \
> +VALGRIND = valgrind --log-file=valgrind.%p \
> + --leak-check=full --track-origins=yes \
> --suppressions=$(abs_top_srcdir)/tests/glibc.supp \
> --suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20
> HELGRIND = valgrind --log-file=helgrind.%p --tool=helgrind \
> --
> 2.17.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
More information about the dev
mailing list