]> git.ipfire.org Git - thirdparty/git.git/commit
max_tree_depth: lower it for clangarm64 on Windows
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 23 Apr 2025 08:01:48 +0000 (08:01 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Apr 2025 16:16:24 +0000 (09:16 -0700)
commit436a42215e51fa2f8b74d128472d7d9bfe2595e1
tree935f1d876e787def212e5976949edb347aca3fe8
parent619950d421f5d99edcb012ce59856bbaac07083d
max_tree_depth: lower it for clangarm64 on Windows

Just as in b64d78ad02ca (max_tree_depth: lower it for MSVC to avoid
stack overflows, 2023-11-01), I encountered the same problem with the
clang builds on Windows/ARM64.

The symptom is an exit code 127 when t6700 tries to verify that `git
archive big` fails.

This exit code is reserved on Unix/Linux to mean "command not found".
Unfortunately in this case, it is the fall-back chosen by
Cygwin's `pinfo::status_exit()` method when encountering
the NSTATUS `STATUS_STACK_OVERFLOW`, see
https://github.com/cygwin/cygwin/blob/cygwin-3.6.1/winsup/cygwin/pinfo.cc#L171

I verified manually that the stack overflow always happens somewhere
around tree depth 1403, therefore 1280 should be a safe bound in these
instances.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
environment.c