Re: recovering from parser errors during compound assignment

2023-04-26 Thread alex xmb ratchev
On Wed, Apr 26, 2023, 23:28 Grisha Levit wrote: > If a parser error is encountered when `local' is parsing an array > assignment string, the installed unwind-protects never run: > > $ f() { local -a a='(())'; }; f > bash: syntax error near unexpected token `(' > $ declare -p a FUNCNAME > declare

Re: heap-use-after-free in rl_do_undo

2023-04-26 Thread Grisha Levit
On Wed, Apr 26, 2023 at 2:15 PM Chet Ramey wrote: > This one looks like it was already hit by the other guy sending in fuzzing > output. You're right, sorry I missed that.

EOF at PS2

2023-04-26 Thread Grisha Levit
A few issues with EOF being received at PS2: The setting of ignoreeof is ignored at PS2: bash --norc -o ignoreeof $ uname \ > ^D Linux (bash exits) If the previous line didn't terminate the current token, ^D causes the token (rather than the command) to be terminated and a new PS2 to be printe

recovering from parser errors during compound assignment

2023-04-26 Thread Grisha Levit
If a parser error is encountered when `local' is parsing an array assignment string, the installed unwind-protects never run: $ f() { local -a a='(())'; }; f bash: syntax error near unexpected token `(' $ declare -p a FUNCNAME declare -a a declare -a FUNCNAME=([0]="f") If there's a PROMPT_C

Re: heap-use-after-free in rl_do_undo

2023-04-26 Thread Chet Ramey
On 4/25/23 7:49 PM, Grisha Levit wrote: This segfaults in a non-ASAN build: HISTFILE= INPUTRC=<(echo '"F": history-substring-search-forward') \ bash --norc -in <<<$'.\n..\n\cP\cT\cPF\cN\cN.\cPF\c_' Thanks for the report. This one looks like it was already hit by the other guy sending in f