This is the mail archive of the gcc-patches@gcc.gnu.org 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 4/9] Expose forcibly_ggc_collect and run it after all selftests


On 09/08/2016 06:30 PM, David Malcolm wrote:
Force a GC at the end of the selftests, to shake out GC-related
issues.  For example, if any GC-managed items have buggy (or missing)
finalizers, this last collection will ensure that things that were
failed to be finalized can be detected by valgrind.

gcc/ChangeLog:
	* ggc-tests.c (forcibly_ggc_collect): Rename to...
	(selftest::forcibly_ggc_collect): ...this, and remove "static".
	(test_basic_struct): Update for above renaming.
	(test_length): Likewise.
	(test_union): Likewise.
	(test_finalization): Likewise.
	(test_deletable_global): Likewise.
	(test_inheritance): Likewise.
	(test_chain_next): Likewise.
	(test_user_struct): Likewise.
	(test_tree_marking): Likewise.
	* selftest-run-tests.c (selftest::run_tests): Call
	selftest::forcibly_ggc_collect at the end of the selftests.
	* selftest.h (selftest::forcibly_ggc_collect): New decl.
Seems reasonable and doesn't depend on earlier patches, right?

Assuming that's correct it seems fine for the trunk whenever you want to install it.

jeff


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