gawk core dumped on too many input values
Joshuah Hurst
joshhurst@gmail.com
Mon Aug 28 11:47:00 GMT 2023
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
More information about the Cygwin
mailing list