This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

[PATCH] Fix memory leaks in libstdc++ ABI tests


These tests don't bother to free memory before exit, but that means we
get ASan errors for them. Fixed like so.

	* testsuite/abi/pr42230.cc: Free memory.
	* testsuite/util/testsuite_abi.cc (demangle): Return std::string
	instead of pointer that might need freeing.
	* testsuite/util/testsuite_abi.h (demangle): Likewise.
	* testsuite/util/testsuite_hooks.cc (verify_demangle): Free memory.

Tested powerpc64le-linux, committed to trunk.


Attachment: patch.txt
Description: Text document


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