Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhostetler@me.com>2015-06-10 00:38:30 +0300
committerJeff Hostetler <jeffhost@microsoft.com>2015-06-29 23:39:11 +0300
commit93b42728952487941bc2b0b78a7f0080b7b3d600 (patch)
tree40acaef6813719257a32835e1b962832964ba713 /tests/clar_libgit2_trace.c
parent4a0313bc4e9b20a55aa6d0922312f97df743df72 (diff)
Include stacktrace summary in memory leak output.
Diffstat (limited to 'tests/clar_libgit2_trace.c')
-rw-r--r--tests/clar_libgit2_trace.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/clar_libgit2_trace.c b/tests/clar_libgit2_trace.c
index ae582d1cb..aaeeb7810 100644
--- a/tests/clar_libgit2_trace.c
+++ b/tests/clar_libgit2_trace.c
@@ -142,9 +142,28 @@ void _cl_trace_cb__event_handler(
switch (ev) {
case CL_TRACE__SUITE_BEGIN:
git_trace(GIT_TRACE_TRACE, "\n\n%s\n%s: Begin Suite", HR, suite_name);
+#if 0 && defined(GIT_MSVC_CRTDBG)
+ git_win32__crtdbg_stacktrace__dump(
+ GIT_WIN32__CRTDBG_STACKTRACE__SET_MARK,
+ suite_name);
+#endif
break;
case CL_TRACE__SUITE_END:
+#if 0 && defined(GIT_MSVC_CRTDBG)
+ /* As an example of checkpointing, dump leaks within this suite.
+ * This may generate false positives for things like the global
+ * TLS error state and maybe the odb cache since they aren't
+ * freed until the global shutdown and outside the scope of this
+ * set of tests.
+ *
+ * This may under-report if the test itself uses a checkpoint.
+ * See tests/trace/windows/stacktrace.c
+ */
+ git_win32__crtdbg_stacktrace__dump(
+ GIT_WIN32__CRTDBG_STACKTRACE__LEAKS_SINCE_MARK,
+ suite_name);
+#endif
git_trace(GIT_TRACE_TRACE, "\n\n%s: End Suite\n%s", suite_name, HR);
break;