From: Joshuah Hurst <joshhurst@gmail.com>
To: cygwin@cygwin.com
Subject: Re: gawk core dumped on too many input values
Date: Mon, 28 Aug 2023 13:47:00 +0200 [thread overview]
Message-ID: <CAEEMktOg5iA-6Q+14ZqgKf_DpjRkjmAyjsuJFDxWie_sjBJLQQ@mail.gmail.com> (raw)
In-Reply-To: <CAOh4nm=yYKtBWhWOwW9rUxu3y8vFOgRA+rW-tTzq-=q63OL_0A@mail.gmail.com>
On Mon, Aug 28, 2023 at 1:08 AM Jeremy Hetzler via Cygwin
<cygwin@cygwin.com> wrote:
>
> On Sun, Aug 27, 2023 at 2:25 PM Ed Morton via Cygwin <cygwin@cygwin.com>
> wrote:
> >
> > This (original email below) turned out to be a general cygwin issue, not
> > a gawk issue:
> >
> > $ LC_ALL=C sed 's/x/y/' $(seq 1000000)
> > Segmentation fault (core dumped)
> >
> > $ LC_ALL=C grep 'foo' $(seq 1000000)
> > Segmentation fault (core dumped)
> >
>
> Seems that all commands linked with cygwin1.dll will fault if you pass them
> a long enough arglist.
>
> For me, /bin/true faults on {1..258231} but not {1..258230}.
>
> > $ /bin/true {1..258230}
> >
>
>
> > $ /bin/true {1..258231}
> > Segmentation fault (core dumped)
>
>
> strace, which is not linked with cygwin1.dll, exits cleanly.
>
> > $ /bin/strace {1..300000}
> > -bash: /bin/strace: Argument list too long
>
>
> See this page [1] on maximum argument lengths.
>
> It would be nice to document this limit, whatever it is.
Is this limit?
$ getconf -a | grep -E 'ARG_MAX'
_POSIX_ARG_MAX 4096
ARG_MAX 32000
>
> It would also be nice to return an error to the shell on too-long arglist.
+1
--
Josh
next prev parent reply other threads:[~2023-08-28 11:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <e0fa509d-890a-2db7-c91f-2b1d904a9a1e@comcast.net>
2023-08-27 18:24 ` Fwd: " Ed Morton
2023-08-27 23:07 ` Jeremy Hetzler
2023-08-28 11:47 ` Joshuah Hurst [this message]
2023-08-28 18:20 ` Brian Inglis
2023-08-29 13:03 ` Corinna Vinschen
2023-08-28 8:38 ` Fwd: " Takashi Yano
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=CAEEMktOg5iA-6Q+14ZqgKf_DpjRkjmAyjsuJFDxWie_sjBJLQQ@mail.gmail.com \
--to=joshhurst@gmail.com \
--cc=cygwin@cygwin.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).