Re: Segmentation fault in expassign when PS1='$[U[0S]+=]'

2017-05-16 Thread Chet Ramey
On 5/15/17 3:58 PM, Eduardo Bustamante wrote: > bash-4.4$ "$[U[0S]+=]" > bash: 0S: value too great for base (error token is "0S") > > It seems like the array index expression causes a longjmp in the > second case, so it stops evaluating. > > Found by fuzzing. > > I think this might be similar

Re: Infinite loop in bash glob matching

2017-05-16 Thread Zoltán Herczeg
Hi, bash version: GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu) This command hangs in any directory on my machine (I don't have a directory without a dot file): ls @(@()). >> The shell globbing library seems to be interpreting this pattern >> weirdly. I don't know the answer for

Re: Segmentation fault in skip_to_delim / bash_directory_completion_hook

2017-05-16 Thread Chet Ramey
On 5/15/17 3:20 PM, Eduardo Bustamante wrote: > I think this is the fix: Yeah, that looks right. I see what happened. Thanks. > dualbus@debian:~/src/gnu/bash$ git diff -- bashline.c > diff --git a/bashline.c b/bashline.c > index 7884416a..c92255d6 100644 > --- a/bashline.c > +++ b/bashline.c >

Re: Infinite loop in bash glob matching

2017-05-16 Thread Daniel Mills
The '[:' may be messing with it, 'a[[:alpha:]:abm[]' should work. It won't match 'amm' because the range only matches a single character, you'd need 'a+([[:alpha:]:abm[])' On Tue, May 16, 2017 at 10:49 AM, Eduardo Bustamante wrote: > On Tue, May 16, 2017 at 2:48 AM, Zoltán

Re: Infinite loop in bash glob matching

2017-05-16 Thread Eduardo Bustamante
On Tue, May 16, 2017 at 2:48 AM, Zoltán Herczeg wrote: > Hi, > > bash enter an infinite loop for this glob: > > ls @(@()). It works fine for me. What version of Bash are you using? And, what files are in the directory you're testing in? dualbus@debian:~/t$ ls a.1 a.2 a.3

Infinite loop in bash glob matching

2017-05-16 Thread Zoltán Herczeg
Hi, bash enter an infinite loop for this glob: ls @(@()). I have been trying to create a bash glob regex converter. It would be great if somebody (privately) could explain me how !() and invalid [] expressions exactly work. I have questions such as: ls a[[:alpha:][:abm] Why does this match