bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Mike Frysinger
Subject: segfault w/bash-4.4-beta2 and assigning empty $*
Date: Thu, 11 Aug 2016 20:29:14 +0800

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  0x000000000045c052 in param_expand (address@hidden "$*", address@hidden, 
address@hidden, address@hidden, address@hidden, address@hidden, 
had_quoted_null_p=0x7fffffffc444, pflags=0x8) at subst.c:8570
#2  0x000000000045ca34 in expand_word_internal (address@hidden, address@hidden, 
address@hidden, address@hidden, address@hidden) at subst.c:9194
#3  0x000000000045e3ac in call_expand_word_internal (address@hidden, 
address@hidden, address@hidden, address@hidden, e=0x0) at subst.c:3555
#4  0x000000000045e50a in expand_string_assignment (address@hidden "$*", 
address@hidden) at subst.c:3643
#5  0x00000000004577de in expand_string_if_necessary (address@hidden "$*", 
address@hidden, address@hidden <expand_string_assignment>) at subst.c:3345
#6  0x0000000000457c8f in do_assignment_internal (word=0x723740, 
address@hidden) at subst.c:3073
#7  0x0000000000460265 in do_word_assignment (flags=0x0, word=<optimized out>) 
at subst.c:3162
#8  expand_word_list_internal (list=<optimized out>, address@hidden) at 
subst.c:10543
#9  0x000000000046056a in expand_words (list=<optimized out>) at subst.c:10098
#10 0x00000000004381cf in execute_simple_command (simple_command=<optimized 
out>, pipe_in=<optimized out>, address@hidden, address@hidden, address@hidden, 
address@hidden) at execute_cmd.c:4132
#11 0x000000000043a24a in execute_command_internal (command=0x723580, 
address@hidden, address@hidden, address@hidden, address@hidden) at 
execute_cmd.c:802
#12 0x000000000048190f in parse_and_execute (string=<optimized out>, 
address@hidden "-c", address@hidden) at evalstring.c:424
#13 0x000000000041f60e in run_one_command (command=<optimized out>) at 
shell.c:1399
#14 0x000000000042111f in main (argc=0x3, argv=0x7fffffffcbc8, 
env=0x7fffffffcbe8) at shell.c:724
-mike

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]