From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Patrick Steinhardt <ps@pks.im>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 6/6] max_tree_depth: lower it for clangarm64 on Windows
Date: Tue, 22 Apr 2025 09:49:40 +0200 (CEST) [thread overview]
Message-ID: <17780ada-bb64-c780-939f-0702f53dd3ca@gmx.de> (raw)
In-Reply-To: <aAdImbydzMUkCFqB@pks.im>
Hi Patrick,
On Tue, 22 Apr 2025, Patrick Steinhardt wrote:
> 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`.
I will change it.
> > + /*
> > + * 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.
True.
It is also quite awful that I cannot find a way to represent
`STATUS_STACK_OVERFLOW` by anything else than exit code 127, which always
misleads me into thinking that an executable or a DLL might be missing.
But I did not find any.
> Anyway, that is clearly outside of the scope of this patch series, so
> the bandaid is good enough for now.
True enough!
Thank you,
Johannes
next prev parent reply other threads:[~2025-04-22 7:49 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
2025-04-22 7:49 ` Johannes Schindelin [this message]
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=17780ada-bb64-c780-939f-0702f53dd3ca@gmx.de \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=ps@pks.im \
/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).