summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlhchavez <lhchavez@lhchavez.com>2020-10-11 17:53:10 -0700
committerlhchavez <lhchavez@lhchavez.com>2020-10-11 18:31:05 -0700
commit4a0dceebe4038b2b14460956105100d159c2e628 (patch)
treed535fe0a25e8a7317c6ec43c07e8c75b24596181 /src
parent2e5f27c7dc81618c185e68a1c6129dd99c69edab (diff)
downloadlibgit2-4a0dceebe4038b2b14460956105100d159c2e628.tar.gz
Make the Windows leak detection more robust
This change: * Increases MY_ROW_LIMIT to 2M, since it has been failing in #5595's tests since it's _super_ close to the limit. * Calls `git_repository_free()` on a `git_repository` that was being leaked only in Windows. * Marks the global `git_repository` on `tests/repo/init.c` as `NULL` after being freed to make any accidental access more noisy. * Uses `cl_assert_equal_i()` in `test_trace_windows_stacktrace__leaks` to make the test failures more actionable. * Renames the globals in `tests/repo/init.c` so that they don't start with an underscore.
Diffstat (limited to 'src')
-rw-r--r--src/win32/w32_crtdbg_stacktrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/win32/w32_crtdbg_stacktrace.c b/src/win32/w32_crtdbg_stacktrace.c
index cdb5ac1a5..22a353d58 100644
--- a/src/win32/w32_crtdbg_stacktrace.c
+++ b/src/win32/w32_crtdbg_stacktrace.c
@@ -57,7 +57,7 @@ static CRITICAL_SECTION g_crtdbg_stacktrace_cs;
* it and try again.
*/
-#define MY_ROW_LIMIT (1024 * 1024)
+#define MY_ROW_LIMIT (2 * 1024 * 1024)
static git_win32__crtdbg_stacktrace__row g_cs_rows[MY_ROW_LIMIT];
static git_win32__crtdbg_stacktrace__row *g_cs_index[MY_ROW_LIMIT];