Re: Question on $@ vs $@$@

2024-08-27 Thread Chet Ramey
On 8/26/24 8:21 PM, Steffen Nurpmeso wrote: Chet Ramey wrote in : |On 8/23/24 5:47 PM, Steffen Nurpmeso wrote: |> If IFS has a value other than the default, then sequences of the |> whitespace characters space, tab, and newline are ignored at the |> beginning and end of the word,

Re: eval '<$(;)' causes Segmentation Fault

2024-08-27 Thread Chet Ramey
On 8/26/24 9:52 PM, Dale R. Worley wrote: writes: Repeat-By: 1. Create a script, i.e. `poc.sh` with the problematic string 2. Execute `bash poc.sh` Interestingly, when I run it (bash 5.1.0(1), which is pretty old), I don't get the seg fault when I enter that string from the

Re: eval '<$(;)' causes Segmentation Fault

2024-08-27 Thread Chet Ramey
On 8/26/24 6:44 PM, youheng@gmail.com wrote: Bash Version: 5.3 Patch Level: 0 Release Status: alpha POC: $ cat poc.sh eval '<${;}' The specific case is an empty command containing only a redirection that results in an expansion error read from a script or string. I can confirm that the

Re: Out of bounds read in parse.y.

2024-08-27 Thread Chet Ramey
On 8/27/24 12:41 AM, Collin Funk wrote: Hi, When compiling with undefined behavior sanitizer and then running: Which version? $ ./bash parse.y:1000:93: runtime error: index -1 out of bounds for type 'int [257]' Please send a reproducer. The offending section of code: case_comman

Re: eval '<$(;)' causes Segmentation Fault

2024-08-27 Thread Chet Ramey
On 8/26/24 10:57 PM, Zachary Santer wrote: Bash Version: 5.3 Patch Level: 0 Release Status: alpha This is devel, commit 2e01122fe7. Really don't get what's going on here: You have two instances of the shell fighting over terminal input. -- ``The lyf so short, the craft so long to lerne.'' -

Re: Out of bounds read in parse.y.

2024-08-27 Thread Collin Funk
Hi Chet, Chet Ramey writes: > Which version? This was from bash devel branch, commit hash 2e01122fe78eb5a42c9b9f3ca46b91f895959675. Built with: ./configure CFLAGS='-fsanitize=undefined' > Why? 0 is a valid index. set_word_top increments word_top before assigning > to word_lineno[word_top

Re: Question on $@ vs $@$@

2024-08-27 Thread Steffen Nurpmeso
Chet Ramey wrote in : |On 8/26/24 8:21 PM, Steffen Nurpmeso wrote: |> Chet Ramey wrote in |> : |>|On 8/23/24 5:47 PM, Steffen Nurpmeso wrote: |>|> If IFS has a value other than the default, then sequences of the |>|> whitespace characters space, tab, and newline are ignored at the |>|

Re: Question on $@ vs $@$@

2024-08-27 Thread Robert Elz
Date:Tue, 27 Aug 2024 22:02:34 +0200 From:Steffen Nurpmeso Message-ID: <20240827200234.95X76_wN@steffen%sdaoden.eu> | Any character in IFS delimits a field, adjacent IFS whitespace | characters are then ignored. Not quite. Any sequence of any amount of IFS

bash passes changed termios to backgrounded process(es) groups?

2024-08-27 Thread Steffen Nurpmeso
Hello. I got a bug report for my mailer which stated $ ( echo blah | Mail root ) & [1] 2754649 $ ^M^M^M^M^C^C [1]+ Stopped ( echo blah | Mail root ) $ fg ( echo blah | Mail root ) $ I turns out i answered him now The thing is that if i apply the patch (this

Re: bash passes changed termios to backgrounded process(es) groups?

2024-08-27 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20240827234659.1xfh6CZb@steffen%sdaoden.eu>: ... |..and it seems that if bash starts a normal process then ICRNL is |set, but if it starts a (process)& or only process&, then not! Yeah, and it seems to me it should not, since programs have to fetch the terminal defau

Re: Question on $@ vs $@$@

2024-08-27 Thread Steffen Nurpmeso
Robert Elz wrote in <14146.1724799...@jacaranda.noi.kre.to>: |Date:Tue, 27 Aug 2024 22:02:34 +0200 |From:Steffen Nurpmeso |Message-ID: <20240827200234.95X76_wN@steffen%sdaoden.eu> | | || Any character in IFS delimits a field, adjacent IFS whitespace || char