Antw: Re: "set -u" and empty arrays

2019-05-13 Thread Ulrich Windl
>>> Chet Ramey schrieb am 13.05.2019 um 21:44 in Nachricht : > On 5/9/19 7:07 AM, Ulrich Windl wrote: >> Bash Version: 4.3 >> Patch Level: 48 >> Release Status: release >> >> Hi! >> >> Is this intended with "set -u": >> # set -u >> # declare -a INSTANCES >> # echo ${INSTANCES[*]} >> bash: INSTAN

Re: Valgrind detects invalid read in bash. malloc assertion fails.

2019-05-13 Thread Grisha Levit
Reproduces for me on Debian 9 with a fresh bash devel build (with or without DEBUG and MALLOC DEBUG). Anything with a glob will do to reproduce: $ valgrind ./bash -c ': *' ==15001== Memcheck, a memory error detector ==15001== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==15001

Re: "set -u" and empty arrays

2019-05-13 Thread Chet Ramey
On 5/9/19 7:07 AM, Ulrich Windl wrote: > Bash Version: 4.3 > Patch Level: 48 > Release Status: release > > Hi! > > Is this intended with "set -u": > # set -u > # declare -a INSTANCES > # echo ${INSTANCES[*]} > bash: INSTANCES[*]: unbound variable > # INSTANCES=() > # echo ${INSTANCES[*]} > bash:

Re: bug#35681: grep's ./configure doesn't work with plain /bin/sh

2019-05-13 Thread Chet Ramey
On 5/12/19 4:14 AM, L A Walsh wrote: > Is it documented somewhere that bash's minimal config is POSIX compliant? No. It's not. You need to add aliases to get basic compliance, then job control and readline/history for the User Portability Utilities option. -- ``The lyf so short, the craft so lo

Re: history -d fails to check for shortened list in loops

2019-05-13 Thread Chet Ramey
On 5/5/19 7:19 PM, j...@saturn.site wrote: > Bash Version: 4.4 > Patch Level: 23 > Release Status: release > > Description: > `history -d` doesn't check for "history position out of range" until > bash returns to prompt Thanks for the report. There's an off-by-one error there that inhibit

Re: Segfault after many stackframes

2019-05-13 Thread Chet Ramey
On 5/4/19 7:56 AM, Ole Tange wrote: >> You've obviously overlooked the FUNCNEST variable and its effects, > > I tried with FUNCNEST: > > $ FUNCNEST=1 > $ re() { t=$((t+1)); if [[ $t -gt 800 ]]; then echo foo; return; > fi; re; }; re > Warning: Program '/bin/bash' crashed. > > So eve

Re: Handling of Zero-Width escapes in PS1

2019-05-13 Thread Chet Ramey
On 5/4/19 1:38 PM, benbe1...@gmx.net wrote: > Bash Version: 4.4 > Patch Level: 19 > Release Status: release > > Description: > When setting up a complex PS1 prompt where parts of the > prompt is expanded on every new prompt displayed by bash > the escape sequences that are gener

Re: Typo in documentation

2019-05-13 Thread Chet Ramey
On 5/3/19 6:42 PM, Jonathan Simozar wrote: > Hello, > > On the page > http://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html, > in the section *${parameter%%word}*, there is a duplicate phrase in the > sentence > > "If the pattern matches If the pattern matches a trailin

Re: Valgrind detects invalid read in bash. malloc assertion fails.

2019-05-13 Thread Chet Ramey
On 4/30/19 7:06 AM, Johannes Müller wrote: > Bash Version: 5.0 > Patch Level: 0 > Release Status: release > > Description: >     When I run "valgrind bash valgrind_issue.sh" on my up-to-date > Debian stretch, >     then valgrind shows invalid read errors and an assertion in > malloc.c fai

Re: Regression in --enable-minimal-config

2019-05-13 Thread Miro Kropáček
On Sun, 12 May 2019 at 21:32, Martijn Dekker wrote: > Chet only commits snapshots to git and not individual fixes, so it's > hard to isolate any one fix from the git repo. Yes, I have noticed. :-) > Are you sure? I just did a test compile on that same commit with > '--enable-minimal-config --enab