This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Support running the selftests under valgrind
- From: Jeff Law <law at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 11 Jul 2016 08:14:26 -0600
- Subject: Re: [PATCH] Support running the selftests under valgrind
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
On 07/08/2016 01:46 PM, David Malcolm wrote:
This patch adds a new phony target to gcc/Makefile.in to make it easy
to run the selftests under valgrind, via "make selftest-valgrind".
This phony target isn't a dependency of anything; it's purely for
convenience (it takes about 4-5 seconds on my box).
Doing so uncovered a few leaks in the selftest suite, which the
patch also fixes, so that it runs cleanly under valgrind (on
x86_64-pc-linux-gnu, configured with --enable-valgrind-annotations,
Successfully bootstrapped®rtested on x86_64-pc-linux-gnu.
Manually verified that the valgrind output is "clean" on
OK for trunk?
in use at exit: 1,203,983 bytes in 2,114 blocks
total heap usage: 4,545 allocs, 2,431 frees, 3,212,841 bytes allocated
definitely lost: 0 bytes in 0 blocks
indirectly lost: 0 bytes in 0 blocks
possibly lost: 0 bytes in 0 blocks
still reachable: 1,203,983 bytes in 2,114 blocks
suppressed: 0 bytes in 0 blocks
Reachable blocks (those to which a pointer was found) are not shown.
To see them, rerun with: --leak-check=full --show-leak-kinds=all
For counts of detected and suppressed errors, rerun with: -v
ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
* Makefile.in (selftest-valgrind): New phony target.
* function-tests.c (selftest::build_cfg): Delete pass instances
created by the test.
* tree-cfg.c (selftest::test_linear_chain): Release dominator