This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Support running the selftests under valgrind

On 07/08/2016 01:46 PM, David Malcolm wrote:
This patch adds a new phony target to gcc/ 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,
at least).

Successfully bootstrapped&regrtested on x86_64-pc-linux-gnu.
Manually verified that the valgrind output is "clean" on
x86_64-pc-linux-gnu [1].

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)

	* (selftest-valgrind): New phony target.
	* function-tests.c (selftest::build_cfg): Delete pass instances
	created by the test.
	(selftest::convert_to_ssa): Likewise.
	(selftest::test_expansion_to_rtl): Likewise.
	* tree-cfg.c (selftest::test_linear_chain): Release dominator
	(selftest::test_diamond): Likewise.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]