Re: segfault w/bash-4.4-beta2 and assigning empty $*

2016-08-11 Thread Mike Frysinger
On 11 Aug 2016 08:32, Chet Ramey wrote:
> On 8/11/16 8:29 AM, Mike Frysinger wrote:
> > simple code to reproduce:
> > bash -c 'v=$*'
> 
> http://lists.gnu.org/archive/html/bug-bash/2016-07/msg00066.html

thanks ... still catching up after vacation and hadn't made it that far yet ;)
-mike


signature.asc
Description: Digital signature


Re: segfault w/bash-4.4-beta2 and assigning empty $*

2016-08-11 Thread Chet Ramey
On 8/11/16 8:29 AM, Mike Frysinger wrote:
> simple code to reproduce:
>   bash -c 'v=$*'

http://lists.gnu.org/archive/html/bug-bash/2016-07/msg00066.html

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



signature.asc
Description: OpenPGP digital signature


segfault w/bash-4.4-beta2 and assigning empty $*

2016-08-11 Thread Mike Frysinger
simple code to reproduce:
bash -c 'v=$*'

gdb backtrace:
Program received signal SIGSEGV, Segmentation fault.
quote_string (string=0x0) at subst.c:3940
3940  if (*string == 0)
#0  quote_string (string=0x0) at subst.c:3940
#1  0x0045c052 in param_expand (string=string@entry=0x7237c0 "$*", 
sindex=sindex@entry=0x7fffc43c, quoted=quoted@entry=0x0, 
expanded_something=expanded_something@entry=0x0, 
contains_dollar_at=contains_dollar_at@entry=0x7fffc448, 
quoted_dollar_at_p=quoted_dollar_at_p@entry=0x7fffc440, 
had_quoted_null_p=0x7fffc444, pflags=0x8) at subst.c:8570
#2  0x0045ca34 in expand_word_internal (word=word@entry=0x7fffc4e0, 
quoted=quoted@entry=0x0, isexp=isexp@entry=0x0, 
contains_dollar_at=contains_dollar_at@entry=0x0, 
expanded_something=expanded_something@entry=0x0) at subst.c:9194
#3  0x0045e3ac in call_expand_word_internal (w=w@entry=0x7fffc4e0, 
q=q@entry=0x0, i=i@entry=0x0, c=c@entry=0x0, e=0x0) at subst.c:3555
#4  0x0045e50a in expand_string_assignment 
(string=string@entry=0x7237a2 "$*", quoted=quoted@entry=0x0) at subst.c:3643
#5  0x004577de in expand_string_if_necessary 
(string=string@entry=0x7237a2 "$*", quoted=quoted@entry=0x0, 
func=func@entry=0x45e4a0 ) at subst.c:3345
#6  0x00457c8f in do_assignment_internal (word=0x723740, 
expand=expand@entry=0x1) at subst.c:3073
#7  0x00460265 in do_word_assignment (flags=0x0, word=) 
at subst.c:3162
#8  expand_word_list_internal (list=, eflags=eflags@entry=0x1f) 
at subst.c:10543
#9  0x0046056a in expand_words (list=) at subst.c:10098
#10 0x004381cf in execute_simple_command (simple_command=, pipe_in=, pipe_in@entry=0x, 
pipe_out=pipe_out@entry=0x, async=async@entry=0x0, 
fds_to_close=fds_to_close@entry=0x7235f0) at execute_cmd.c:4132
#11 0x0043a24a in execute_command_internal (command=0x723580, 
asynchronous=asynchronous@entry=0x0, pipe_in=pipe_in@entry=0x, 
pipe_out=pipe_out@entry=0x, fds_to_close=fds_to_close@entry=0x7235f0) 
at execute_cmd.c:802
#12 0x0048190f in parse_and_execute (string=, 
from_file=from_file@entry=0x4c1d69 "-c", flags=flags@entry=0x4) at 
evalstring.c:424
#13 0x0041f60e in run_one_command (command=) at 
shell.c:1399
#14 0x0042111f in main (argc=0x3, argv=0x7fffcbc8, 
env=0x7fffcbe8) at shell.c:724
-mike


signature.asc
Description: Digital signature