From: Patrick Steinhardt <ps@pks.im>
To: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH 6/6] max_tree_depth: lower it for clangarm64 on Windows
Date: Tue, 22 Apr 2025 09:43:21 +0200 [thread overview]
Message-ID: <aAdImbydzMUkCFqB@pks.im> (raw)
In-Reply-To: <6ebc3ef57fd0455fc70c4a8531c7ed094d9cdaff.1745239150.git.gitgitgadget@gmail.com>
On Mon, Apr 21, 2025 at 12:39:10PM +0000, Johannes Schindelin via GitGitGadget wrote:
> diff --git a/environment.c b/environment.c
> index 9e4c7781be0..cc853950bb2 100644
> --- a/environment.c
> +++ b/environment.c
> @@ -82,9 +82,21 @@ int max_allowed_tree_depth =
> * the stack overflow can occur.
> */
> 512;
> +#else
> +#if defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)
Tiny nit, only because it puzzled me for a second: this should probably
be `#elif`.
> + /*
> + * Similar to Visual C, it seems that on Windows/ARM64 the clang-based
> + * builds have a smaller stack space available. When running out of
> + * that stack space, a `STATUS_STACK_OVERFLOW` is produced. When the
> + * Git command was run from an MSYS2 Bash, this unfortunately results
> + * in an exit code 127. Let's prevent that by lowering the maximal
> + * tree depth; This value seems to be low enough.
> + */
> + 1280;
> #else
> 2048;
> #endif
> +#endif
Hm. This whole construct feels rather awful, if you ask me. Instead of
papering over the issue it would be nice if we eventually fixed the root
cause, which is that we use recursion on a data structure that has an
unbounded depth in theory.
Anyway, that is clearly outside of the scope of this patch series, so
the bandaid is good enough for now.
Patrick
next prev parent reply other threads:[~2025-04-22 7:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-21 12:39 [PATCH 0/6] Support Windows/ARM64 Johannes Schindelin via GitGitGadget
2025-04-21 12:39 ` [PATCH 1/6] bswap.h: add support for built-in bswap functions Dennis Ameling via GitGitGadget
2025-04-21 12:39 ` [PATCH 2/6] config.mak.uname: add support for clangarm64 Dennis Ameling via GitGitGadget
2025-04-21 12:39 ` [PATCH 3/6] mingw: do not use nedmalloc on Windows/ARM64 Johannes Schindelin via GitGitGadget
2025-04-22 7:43 ` Patrick Steinhardt
2025-04-22 8:17 ` Dropping nedmalloc support? was " Johannes Schindelin
2025-04-21 12:39 ` [PATCH 4/6] msvc: do handle builds " Johannes Schindelin via GitGitGadget
2025-04-21 12:39 ` [PATCH 5/6] mingw(arm64): do move the `/etc/git*` location Johannes Schindelin via GitGitGadget
2025-04-21 12:39 ` [PATCH 6/6] max_tree_depth: lower it for clangarm64 on Windows Johannes Schindelin via GitGitGadget
2025-04-22 7:43 ` Patrick Steinhardt [this message]
2025-04-22 7:49 ` Johannes Schindelin
2025-04-21 13:35 ` [PATCH 0/6] Support Windows/ARM64 Junio C Hamano
2025-04-23 8:01 ` [PATCH v2 " Johannes Schindelin via GitGitGadget
2025-04-23 8:01 ` [PATCH v2 1/6] bswap.h: add support for built-in bswap functions Dennis Ameling via GitGitGadget
2025-04-23 8:01 ` [PATCH v2 2/6] config.mak.uname: add support for clangarm64 Dennis Ameling via GitGitGadget
2025-04-23 8:01 ` [PATCH v2 3/6] mingw: do not use nedmalloc on Windows/ARM64 Johannes Schindelin via GitGitGadget
2025-04-23 16:20 ` Junio C Hamano
2025-04-23 8:01 ` [PATCH v2 4/6] msvc: do handle builds " Johannes Schindelin via GitGitGadget
2025-04-23 8:01 ` [PATCH v2 5/6] mingw(arm64): do move the `/etc/git*` location Johannes Schindelin via GitGitGadget
2025-04-23 8:01 ` [PATCH v2 6/6] max_tree_depth: lower it for clangarm64 on Windows Johannes Schindelin via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aAdImbydzMUkCFqB@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=johannes.schindelin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).