Subject: Re: Fwd: gawk core dumped on too many input values
From: Takashi Yano via Cygwin <[email-masked]>
To: [email-masked]
Cc: Ed Morton <[email-masked]>
Date: Mon, 28 Aug 2023 17:38:28 +0900
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>

On Sun, 27 Aug 2023 13:24:55 -0500
Ed Morton 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)
> 
> Regards,
> 
>      Ed.
> 
> -------- Forwarded Message --------
> Subject: 	gawk core dumped on too many input values
> Date: 	Sun, 27 Aug 2023 08:09:54 -0500
> From: 	Ed Morton <[email-masked]>
> To: 	[email-masked] <[email-masked]>
> 
> 
> 
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: cygwin
> Compiler: gcc
> Compilation CFLAGS: -ggdb -O2 -pipe -Wall -Werror=format-security 
> -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong 
> --param=ssp-buffer-size=4 
> -fdebug-prefix-map=/cygdrive/d/a/scallywag/gawk/gawk-5.2.2-1.x86_64/build=/usr/src/debug/gawk-5.2.2-1 
> -fdebug-prefix-map=/cygdrive/d/a/scallywag/gawk/gawk-5.2.2-1.x86_64/src/gawk-5.2.2=/usr/src/debug/gawk-5.2.2-1 
> -DNDEBUG
> uname output: CYGWIN_NT-10.0-22621 TournaMart_2023 3.4.8-1.x86_64 
> 2023-08-17 17:02 UTC x86_64 Cygwin
> Machine Type: x86_64-pc-cygwin
> 
> Gawk Version: 5.2.2
> 
> Attestation 1:
>          I have read 
> https://www.gnu.org/software/gawk/manual/html_node/Bugs.html.
>          Yes
> 
> Attestation 2:
>          I have not modified the sources before building gawk.
>          True
> 
> Description:
>          I was trying to test something related to ARG_MAX when I ran the
>          awk script below and it core dumped instead of reporting an error
>          and exiting gracefully. In case it's useful getconf ARG_MAX outputs
>          32000.
> 
> Repeat-By:
>          $ LC_ALL=C awk 'BEGIN{print ARGC}' $(seq 1000000)
>          Segmentation fault (core dumped)

Thanks for the report.
I will submit a patch for this issue shortly.

-- 
Takashi Yano <[email-masked]>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple