Re: IGNOREEOF is ineffective when holds a big integer

2025-06-17 Thread microsuxx
i think i remember chat answering to me 64b , as cpu .. intmax() { declare -i i=0 o= ; while (( o = i , ++i , i > o )) ; do : ; done ; echo $o $i ; } ; time intmax ( doesnt appear to finish soon ) On Wed, Jun 18, 2025, 6:00 AM shynur . wrote: > Martin: > > In variables.c at line 6243 we have

Re: IGNOREEOF is ineffective when holds a big integer

2025-06-17 Thread shynur .
Martin: > In variables.c at line 6243 we have > eof_encountered_limit = (*temp && all_digits (temp)) ? atoi (temp) : 10; > > Presumably in your build of Bash, as in mine, `int` is > 32-bit, so the maximum value convertible by atoi would > be 2147483647. Larger values are returned modulo > 4294

Re: IGNOREEOF is ineffective when holds a big integer

2025-06-17 Thread Martin D Kealey
In variables.c at line 6243 we have eof_encountered_limit = (*temp && all_digits (temp)) ? atoi (temp) : 10; Presumably in your build of Bash, as in mine, `int` is 32-bit, so the maximum value convertible by atoi would be 2147483647. Larger values are returned modulo 4294967296 (with 2's complemen

Re: IGNOREEOF is ineffective when holds a big integer

2025-06-17 Thread microsuxx
64 bit , as cpu .. On Wed, Jun 18, 2025, 4:36 AM shynur . wrote: > ``` > INT_MAX=`echo \`printf '%u' -1\`/2 | bc` > IGNOREEOF=INT_MAX > # Then I typed C-d, bash exited... > ``` > > ``` > IGNOREEOF=127 > # C-d, C-d, C-d, ... > ``` > > Why doesn’t the first piece of code work as expected? > > In B

Re: IGNOREEOF is ineffective when holds a big integer

2025-06-17 Thread shynur .
Sorry, my earlier description was a bit unclear—my apologies. I accidentally left out the ‘$’ before INT_MAX when copying it over, but I did include the ‘$’ in my actual testing. As for `IGNOREEOF=127`, I expected it to let me press C-d over a hundred times without exiting bash, and in my testin

Re: IGNOREEOF is ineffective when holds a big integer

2025-06-17 Thread Greg Wooledge
On Wed, Jun 18, 2025 at 02:31:06 +, shynur . wrote: > ``` > INT_MAX=`echo \`printf '%u' -1\`/2 | bc` > IGNOREEOF=INT_MAX > # Then I typed C-d, bash exited... > ``` You probably meant to type $INT_MAX there, not INT_MAX. You assigned a string to the IGNOREEOF variable, not a number. According

IGNOREEOF is ineffective when holds a big integer

2025-06-17 Thread shynur .
``` INT_MAX=`echo \`printf '%u' -1\`/2 | bc` IGNOREEOF=INT_MAX # Then I typed C-d, bash exited... ``` ``` IGNOREEOF=127 # C-d, C-d, C-d, ... ``` Why doesn’t the first piece of code work as expected? In Bash, what exactly is the INT_MAX that I can safely use anywhere? -- shynur

Re: IGNOREEOF is ineffective when holds a big integer

2025-06-17 Thread shynur .
type: IGNOREEOF=INT_MAX should be IGNOREEOF=$INT_MAX (Doesn't impact the conclusion.)

Re: exec3.sub never finishes with huge argmax

2025-06-17 Thread Chet Ramey
On 6/17/25 11:30 AM, Joel Ebel wrote: On Tue, Jun 17, 2025 at 11:14 AM Chet Ramey > wrote: On 6/17/25 11:03 AM, Joel Ebel wrote: > After some digging, we found that in our environment there's no upper bound > on RLIMIT_STACK, so it's set to the m

Re: exec3.sub never finishes with huge argmax

2025-06-17 Thread Joel Ebel via Bug reports for the GNU Bourne Again SHell
On Thu, Jun 12, 2025 at 2:27 PM Chet Ramey wrote: > On 6/12/25 9:17 AM, Joel Ebel wrote: > > > > > > On Thu, Jun 12, 2025 at 9:09 AM Joel Ebel > > wrote: > > > > > > > > On Wed, Jun 11, 2025 at 4:03 PM Chet Ramey > > wrote: > > > >

Re: exec3.sub never finishes with huge argmax

2025-06-17 Thread Joel Ebel via Bug reports for the GNU Bourne Again SHell
On Tue, Jun 17, 2025 at 11:14 AM Chet Ramey wrote: > On 6/17/25 11:03 AM, Joel Ebel wrote: > > > After some digging, we found that in our environment there's no upper > bound > > on RLIMIT_STACK, so it's set to the maximum allowed value of > > RLIM64_INFINITY or 2^64-1 > > Then make sets the stac

Re: exec3.sub never finishes with huge argmax

2025-06-17 Thread Chet Ramey
On 6/17/25 11:03 AM, Joel Ebel wrote: After some digging, we found that in our environment there's no upper bound on RLIMIT_STACK, so it's set to the maximum allowed value of RLIM64_INFINITY or 2^64-1 Then make sets the stack limit to the maximum value, again RLIM64_INFINITY. glibc calculates