Bash bind bug: infinite loop with memory leak in Readline

2016-08-10 Thread Christian Klomp
Hi, I found a problem with the binding of key sequences to macros that results in bash allocating all the memory until the process is killed. It happens when a key is mapped to itself, e.g., `bind '"3":"3"'`. Now when '3' is typed the while loop inside the readline_internal_charloop function will

Unable to dereference function-local nameref to global variable of same name

2016-08-10 Thread Andreas Kusalananda Kähäri
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: openbsd6.0 Compiler: cc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='openbsd6.0' -DCONF_MACHTYPE='x86_64-unknown-openbsd6.0' -DCONF_VENDOR='unknown'

a patch to fix sh_stat on SunOS

2016-08-10 Thread Dmitry Goncharov
Good morning, The following piece of shell code does not work on sunos. mkfifo /tmp/pipe cat < /tmp/pipe & exec 6>/tmp/pipe test -p /dev/fd/6 && echo pipe The reason is on sunos /dev/fd/6 is a special character file, not a pipe (unlike bsd), not a symlink (unlike linux, cygwin). sh_stat ends up

Re: a patch to fix sh_stat on SunOS

2016-08-10 Thread Chet Ramey
On 8/9/16 9:12 PM, Dmitry Goncharov wrote: > Good morning, > > The following piece of shell code does not work on sunos. > mkfifo /tmp/pipe > cat < /tmp/pipe & > exec 6>/tmp/pipe > test -p /dev/fd/6 && echo pipe > > The reason is on sunos /dev/fd/6 is a special character file, not a pipe >

Re: a patch to fix sh_stat on SunOS

2016-08-10 Thread Dmitry Goncharov
On Wed, Aug 10, 2016 at 9:56 AM, Chet Ramey wrote: > So what you're saying is that you don't like how SunOS implements /dev/fd > > and you'd like bash to override the native implementation semantics. i don't care how sunos implements /dev/fd. i care that bash fails on

Re: a patch to fix sh_stat on SunOS

2016-08-10 Thread Chet Ramey
On 8/10/16 10:19 AM, Dmitry Goncharov wrote: > > > On Wed, Aug 10, 2016 at 9:56 AM, Chet Ramey > wrote: > >> So what you're saying is that you don't like how SunOS implements /dev/fd > >> and you'd like bash to override the native

Re: bash: remove the format string "%q" in the unicode3.sub

2016-08-10 Thread dengke...@windriver.com
Hi chet Thanks for you help. 1. This file: http://git.savannah.gnu.org/cgit/bash.git/tree/tests/unicode3.sub?h=devel=74b8cbb41398b4453d8ba04d0cdd1b25f9dcb9e3 When executed to the 3 line: "$payload" On my target the output was: unicode3.sub: line 3: 5�@3�+�S8: command not found

Re: a patch to fix sh_stat on SunOS

2016-08-10 Thread Dmitry Goncharov
On Wed, Aug 10, 2016 at 10:30 AM, Chet Ramey wrote: > > On 8/10/16 10:19 AM, Dmitry Goncharov wrote: > > > bash does not do what the following quote from the bash man page says it > > > does "If any file argument to one of the primaries is of the form > > > /dev/fd/n,

bash test: lastpipe.tests failed

2016-08-10 Thread dengke...@windriver.com
Hi all When I run the bash test lastpipe.tests, there were some errors occurred. The code in lastpipe.tests: shopt -s lastpipe ... exit 142 | false echo $? -- ${PIPESTATUS[@]} The error output: lastpipe.tests: line 41: 708 Exit 142exit 142 703 Hangup

Re: bash: remove the format string "%q" in the unicode3.sub

2016-08-10 Thread Chet Ramey
On 8/10/16 2:42 AM, dengke...@windriver.com wrote: > Hi chet > > Thanks for you help. > > 1. This file: > > > http://git.savannah.gnu.org/cgit/bash.git/tree/tests/unicode3.sub?h=devel=74b8cbb41398b4453d8ba04d0cdd1b25f9dcb9e3 > > When executed to the 3 line: > > "$payload" > > On my

Re: bash test: lastpipe.tests failed

2016-08-10 Thread Chet Ramey
On 8/10/16 3:32 AM, dengke...@windriver.com wrote: > Hi all > > When I run the bash test lastpipe.tests, there were some errors occurred. > > The code in lastpipe.tests: > > shopt -s lastpipe > ... > exit 142 | false > echo $? -- ${PIPESTATUS[@]} > > The error output: > >

Re: Bash crashes while handling very long string in parameter expansion

2016-08-10 Thread Siteshwar Vashisht
- Original Message - > From: "Chet Ramey" > To: "Siteshwar Vashisht" , bug-bash@gnu.org > Cc: "chet ramey" > Sent: Tuesday, August 9, 2016 7:43:54 PM > Subject: Re: Bash crashes while handling very long string in parameter

Re: Bash crashes while handling very long string in parameter expansion

2016-08-10 Thread Chet Ramey
On 8/10/16 7:20 AM, Siteshwar Vashisht wrote: > > (gdb) frame 1 > #1 0x00455a4a in sub_append_string ( > source=0x7ffef75de010 >