Skip to content

Commit d8976d5

Browse files
committed
Merge branch 'fix-vs-win-test-with-new-depth-limit-test-cases'
Further limit tree depth max to avoid Windows build running out of the stack space. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents f305fce + 16cd47e commit d8976d5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

environment.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,18 @@ int merge_log_config = -1;
8181
int precomposed_unicode = -1; /* see probe_utf8_pathname_composition() */
8282
unsigned long pack_size_limit_cfg;
8383
enum log_refs_config log_all_ref_updates = LOG_REFS_UNSET;
84-
int max_allowed_tree_depth = 2048;
84+
int max_allowed_tree_depth =
85+
#ifdef _MSC_VER
86+
/*
87+
* Visual C-compiled Git seems to run into internal stack overflow
88+
* detection in the `RtlpAllocateHeap()` function that is called from
89+
* within `git_inflate_init()`'s call tree, unless the following value
90+
* is low enough.
91+
*/
92+
512;
93+
#else
94+
2048;
95+
#endif
8596

8697
#ifndef PROTECT_HFS_DEFAULT
8798
#define PROTECT_HFS_DEFAULT 0

0 commit comments

Comments
 (0)