Re: how does ssh cause this loop to preterminate?

2021-03-24 Thread Eduardo Bustamante
On Wed, Mar 24, 2021 at 2:22 PM gregrwm wrote: > > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security > uname output: Linux ginger 4.18.0-240.15.1.el8_3.x86_64 #1 S

Re: incorrect character handling

2021-03-30 Thread Eduardo Bustamante
On Tue, Mar 30, 2021 at 1:38 PM by.sm--- via Bug reports for the GNU Bourne Again SHell wrote: > > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: darwin18.7.0 > Compiler: clang > Compilation CFLAGS: -DSSH_SOURCE_BASHRC > uname output: Darwin Mac 18.6.0

Re: Latest devel branch push

2021-05-15 Thread Eduardo Bustamante
On Sat, May 15, 2021 at 4:54 AM Alex fxmbsw7 Ratchev wrote: > > may i ask frankly for the git cmd to get it You can find the instructions on how to clone the repository in the Savannah portal: https://savannah.gnu.org/git/?group=bash i.e. git clone https://git.savannah.gnu.org/git/bash.git

Re: $PPID behave differently in 5.1 and 4.3

2021-05-16 Thread Eduardo Bustamante
On Sun, May 16, 2021 at 1:38 AM leodream wrote: > > I created 2 scripts like below > > > Running the test1.sh with bash 5.1 will have different PPID printed by the > last test2.sh call when it is executed in sub-shell.

Re: current bash.git.devel segfaults on my code

2021-10-20 Thread Eduardo Bustamante
On Wed, Oct 20, 2021 at 3:46 AM Alex fxmbsw7 Ratchev wrote: > > it betteted up, it still segfaults without valgrind but valgrind dorsnt > show so many entries anymore > there are 3 valgrind outputs, one without -- two with ine --arg ( the > valgrind supported .. ) and three the two --opts > > the

Re: Performances comparission between 5.1 and 5.2.

2022-08-15 Thread Eduardo Bustamante
On Mon, Aug 15, 2022 at 10:09 AM Greg Wooledge wrote: > On Mon, Aug 15, 2022 at 07:05:49PM +0200, felix wrote: > > Description: > > Trying some script under 5.2 beta, rc1 and rc2, I was surprised by > execution time. > > Pre-release versions of bash are built with extra debugging stuff, and

Re: bottom of ${BASH_LINENO[*]} stack is always '0'

2023-02-22 Thread Eduardo Bustamante
On Tue, Feb 21, 2023 at 2:58 PM bill-auger wrote: > > the bottom of the ${BASH_LINENO[*]} stack is always '0'; and the > array never contains the line number of the actual call site, as > ${LINENO} does - is that expected behavior? > > im not sure if this is a bug or not - it seems like a bug to m

Re: With DEBUG trap, resizing window crashes script

2023-05-10 Thread Eduardo Bustamante
On Wed, May 10, 2023 at 1:03 PM Wiley Young wrote: > (...) > The script is set up to enable the DEBUG trap and prompt. When the first > user prompt appears, in this case `set -x` although xtrace was enabled at > the crashbang, if I resize the window then press enter, the script dies and > displa

Re: git amend commit with backticks on cli causes tty to crash

2023-07-21 Thread Eduardo Bustamante
On Fri, Jul 21, 2023 at 9:14 AM Dale R. Worley wrote: > (...) > Also, you don't state explicitly what you think the error is. I assume > you mean that "Press [ctrl-d] again and tab (tty 5) crashes." should not > be happening. > > But it looks to me like you're sending ctrl-d into a shell. That,

Re: String replacement drops leading '-e' if replacing char is a space

2023-08-13 Thread Eduardo Bustamante
> > Description: > > If a string starts with '-e' the replacement operators ${x//,/ } and ${x/, > /} drop the '-e'. > The behaviour seems to be very specific: the string must start with '-e' > and the replacing character has to be a space. > > Repeat-By: > > x='-e,b,c' > echo ${x//,/ } > b c > echo

Re: Any chance of multi-dimensional arrays?

2012-11-25 Thread Eduardo Bustamante
mputing)#Text_.28CLI.29_shells -- Eduardo Bustamante On Sun, Nov 25, 2012 at 9:32 PM, Rene Herman wrote: > On 11/25/2012 08:54 PM, Bob Proulx wrote: > > There are various naming conventions and schemes to simulate >> multi-dimensional arrays using single dimension arrays. Sin

Re: bash doesn't display tabs for tabs -- ignores tabstops.

2013-05-15 Thread Eduardo Bustamante
The cool thing about free software is that you're free to submit patches. Please consider that option, instead of ranting on what Chet should do. -- Eduardo A. Bustamante López

Re: How to read fields into an array?

2014-08-01 Thread Eduardo Bustamante
Remember to use help-bash for these questions.

Re: 'time' doesn't time subshells that exec

2017-09-09 Thread Eduardo Bustamante
On Sat, Sep 9, 2017 at 5:16 AM, Martijn Dekker wrote: > The 'time' reserved word seems to be unable to time subshells that run > 'exec'. Is this intentional? (ksh93, mksh and zsh all do manage this.) As far as I know, it is intentional. Read this thread which is about a similar issue: https://lis

Re: Declared Var Dynamic Initialization = No Return Code Back?

2017-09-12 Thread Eduardo Bustamante
On Tue, Sep 12, 2017 at 5:04 PM, Adam Danischewski wrote: [...] > Declaring a variable doesn't seem risky enough to eat up the return code. > Is there a reason for this? I doubt that it would break anything to change. > It's a lot more intuitive and syntactically streamlined to check for > missing

Re: Bash should reset OLDPWD upon login, *only*.

2017-10-03 Thread Eduardo Bustamante
On Tue, Oct 3, 2017 at 5:01 PM, L A Walsh wrote: [...] Ah, because you can't protect against everything, you leave your system > open with no passwords on the logins? What's your system name again? :-) Linda. This topic has no relation at all with the reported issue, and we're doing a disser

Re: Simple sleep scripts causes SEGFAULT

2017-10-25 Thread Eduardo Bustamante
On Wed, Oct 25, 2017 at 11:21 PM, Alex Coffin wrote: [...] > Description: > Segmentation fault. I'm honestly not sure why. I was using batsh to > make a simple script. When I ran it generated a segfault. The segmentation > fault DOES NOT occur if "sleep" is replaced with "echo". > I also r

Re: 'fc' outputing text of DEBUG trap

2017-10-27 Thread Eduardo Bustamante
On Fri, Oct 27, 2017 at 1:21 AM, Boruch Baum wrote: > In Debian, using Bash version 4.4, path level 12, I've set a DEBUG trap > in my .bashrc and tried running the following command, with the > following output resulting. The five lines between the command being run > by fc and that command's outp

Re: New MILLISECONDS “special” variable?

2017-11-02 Thread Eduardo Bustamante
El mié., nov. 1, 2017 8:48 PM, Eduardo A. Bustamante López < dual...@gmail.com> escribió: > [...] > /* FIXME: do better validation */ > static int parse_timeval (const char *s, struct timeval *tv) { > char *ds; > timerclear(tv); > tv->tv_sec = strtol(s, &ds, 10); > if (ds && *ds == '.') {

Re: help complete: mention remove all AND restore all

2017-11-05 Thread Eduardo Bustamante
On Sun, Nov 5, 2017 at 7:01 PM, 積丹尼 Dan Jacobson wrote: > OK, please on > $ help complete > at "-r" please mention > "To instead toggle on and off PROGRAMMABLE completion, use shopt -[su] > progcomp." > > Reason: there is very little chance the user could Google the right > answer out of the fore

Re: Potential Denial of Service Vulnerability in embedded commands - Bash version 4.4.12(1) - Release

2017-11-07 Thread Eduardo Bustamante
On Tue, Nov 7, 2017 at 5:58 AM, Alex Nichols wrote: [...] > In order to trigger the bug I executed the command *`*cat sploit.buf*`* > where sploit.buf is a just over 2GB file of ‘A’ characters. When this > command is executed the bash terminal crashes with the following error > “Bash: xrealloc: ..

Re: umask builtin

2017-11-08 Thread Eduardo Bustamante
On Wed, Nov 8, 2017 at 10:06 AM, kalle wrote: [...] >> From umask(1p): >> For a symbolic_mode value, the new value of the file mode creation mask >> shall be the logical complement of the file permission bits portion of >> the file mode specified by the symbolic_mode string. > > This senten

Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory

2017-11-28 Thread Eduardo Bustamante
On Mon, Nov 27, 2017 at 6:00 PM, Mikulas Patocka wrote: [...] > Will you commit my patch? - if you agree with it. Hi Mikulas. Chet is the one and only bash maintainer, you'd have to convince him. As a bystander that happens to be interested in bash's development, I agree with your points, but ex

Re: Bash: sleep execution issue with bash loadable builtins

2017-12-04 Thread Eduardo Bustamante
On Mon, Dec 4, 2017 at 5:08 AM, Thiruvadi Rajaraman wrote: > Hi Chester, > > Based on your review comments and suggestions about the earlier fixes, > reworked on the fix with pselect() > to block the signal. FYI, Chet pushed a few changes related to this in commits 564452a3ec9b73a53949325cc4acb9

Re: Use of --rcfile does not preclude read of /etc/bash.bashrc

2018-01-02 Thread Eduardo Bustamante
On Tue, Jan 2, 2018 at 3:05 PM, Nat! wrote: [...] > Description: > The documentation states, that /etc/bash.bashrc should not be read > (rightfully so IMO) with > --rcfile. FWIW, there are two things going on here: (1) /etc/bash.bashrc is actually disabled by default in the upstream bash

Re: xmalloc crash

2018-01-08 Thread Eduardo Bustamante
On Mon, Jan 8, 2018 at 8:22 AM, Chet Ramey wrote: > On 1/6/18 2:40 PM, Eduardo A. Bustamante López wrote: > >> So the allocation fails, even if the system has enough memory to handle it. >> Upon closer inspection: >> >> dualbus@ubuntu:~/src/gnu/bash/lib/malloc$ cat -n malloc.c | sed -n >> '77

Re: bug-bash

2018-02-08 Thread Eduardo Bustamante
On Thu, Feb 8, 2018 at 4:23 PM, Nolan <4030...@gmail.com> wrote: > I have found a 'result' of a command that cannot be a feature. > > Enter command, command executes, prints exit at the prompt. > > Goes to next line in terminal showing the "#" prompt. > > A "whoami" says root. > > Is this known? >

Re: Heap buffer overread in token_is_assignment

2018-02-20 Thread Eduardo Bustamante
On Tue, Feb 20, 2018 at 2:07 PM, wrote: > > > > > Configuration Information [Automatically generated, do not change]: > Machine: i686 > OS: linux-gnu > Compiler: afl-gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'

Re: Avoiding file-based constraints for tmp files (ws Re: [minor] umask 400 causes here-{doc,string} failure)

2018-03-12 Thread Eduardo Bustamante
On Mon, Mar 12, 2018 at 2:05 PM, L A Walsh wrote: [...] > What would be the downside(s) of such an implementation? There's code out there that relies on several properties of regular files, one of them for example, that you can seek on them. I recommend against any change to here documents and he

Re: Strange/incorrect behavior of a fake executable file

2018-03-13 Thread Eduardo Bustamante
On Tue, Mar 13, 2018 at 7:24 PM, Vladimir Likic wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-lin

Re: Strange/incorrect behavior of a fake executable file

2018-03-14 Thread Eduardo Bustamante
(I've added bug-bash again) On Tue, Mar 13, 2018 at 11:32 PM, Vladimir Likic wrote: > Thanks for the quick response! > Your are correct, "." was in PATH (my bad), an it's calling itself > recursively. That went into a spiral and crashed the computer (literally). > Why is bash actually executing

Re: ${parameter/pattern/string} behaviour changed

2018-03-16 Thread Eduardo Bustamante
On Fri, Mar 16, 2018 at 1:18 PM, wrote: [...] > Bash Version: 4.3 > Patch Level: 42 > Release Status: release > > Description: > Command: x="a b c"; echo "'${x// /','}'" > On old systems the output is: 'a','b','c' > In this version the output is: 'a,b,c' > This ne

Re: bash shows an error message about unpaired quotes, but they are paired

2018-03-26 Thread Eduardo Bustamante
On Mon, Mar 26, 2018 at 1:54 PM, wrote: [...] > run 'sed -i "6a\find /srv/cowrie/log/ -mtime +7 -name \'cowrie.*\' -delete" > cowrietest' That's not how you escape single quotes within single quotes. Read: https://mywiki.wooledge.org/Quotes#Types_of_quoting The proper way would be: run 'sed -i

Re: PDF documentation output not readable (3.2.6 GNU Parallel)

2018-05-10 Thread Eduardo Bustamante
El jue., may. 10, 2018 11:11 AM, Greg Wooledge escribió: > [...] > > from Section 3.2.6 GNU Parallel > > GNU parallel is a separate project from GNU bash. You'll want to > report the bug to the GNU parallel tracker, at > or whatever email > equival

Re: [PATCH] A terminating signal has to complete a bash process

2018-05-21 Thread Eduardo Bustamante
It's in commit 96b7e26874047647e85bd5c7e71a7f664174c2cc, in the `devel' branch of the git repository. On Mon, May 21, 2018 at 12:42 AM, Andrei Vagin wrote: > Hello Chet, > > Have you had a chance to try this patch? Let me know if you will have > any questions. > > Thanks, > Andrei > > On Thu, May

Re: announcing bashj

2018-06-23 Thread Eduardo Bustamante
On Sat, Jun 23, 2018 at 12:08 PM, pg wrote: [...] > Description: BASHJ - ANNOUNCE TO THE DEVELOPMENT TEAM OF BASH > > I am pleased to inform you about bashj - a bash 'mutant' with java > support. > This product opens numerous very interesting fields to bash developers. I have a few questi

Re: announcing bashj

2018-06-28 Thread Eduardo Bustamante
://fil.gonze.org/wikiPG/index.php/Project_bashj_:_a_bash_mutant_with_java_support>* >- *http://fil.gonze.org/wikiPG/index.php/Bashj_programming_guide ><http://fil.gonze.org/wikiPG/index.php/Bashj_programming_guide>* > > > On 23/06/18 20:45, Eduardo Bustamante wrote: > > On Sat, Jun 23,

Re: Number with sign is read as octal despite a leading 10#

2018-07-10 Thread Eduardo Bustamante
On Tue, Jul 10, 2018 at 1:57 PM, Isaac Marcos wrote: > Chet Ramey () wrote: [..] > This is not a serious argument. [...] > I don't care. All other shells do this correctly. It makes you the only one > wrong. > > This is not a serious discussion. Can you keep the discussion civil? I don't get why

Re: Assignment of $* to a var removes spaces on unset IFS.

2018-08-13 Thread Eduardo Bustamante
On Mon, Aug 13, 2018 at 5:25 PM Robert Elz wrote: [...] > What's more, reporting bugs in bash 4.3 is just a waste of everyone's time. > Upgrade to (at least) the current released version, and use that instead. Adding to this point: * bash 4.3 was released 4 years ago (2014-02-26) * bash 4.4 is t

Re: expand_prompt_string segmentation faults

2018-09-15 Thread Eduardo Bustamante
On Sat, Sep 15, 2018 at 8:15 PM Chet Ramey wrote: (...) > Thanks for the report. They are the same problem. Thanks Chet. Do you have a patch for the issue? I have a few other cases but I'm not sure if they're all due to the same cause.

Re: Bash-5.0-alpha available

2018-09-16 Thread Eduardo Bustamante
On Wed, May 23, 2018 at 12:55 PM Chet Ramey wrote: > > The first alpha release of bash-5.0 is now available with the URL > > ftp://ftp.cwru.edu/pub/bash/bash-5.0-alpha.tar.gz > > and from the bash-5.0-testing branch in the bash git repository > (http://git.savannah.gnu.org/cgit/bash.git/log/?h=bas

Re: [bug-bash] Which commit for a bug in 4.3.48 which is fixed in 4.4.23

2018-09-24 Thread Eduardo Bustamante
On Mon, Sep 24, 2018 at 4:09 AM Dr. Werner Fink wrote: (...) > Reconstructed the attached patch ... seems to work Out of curiosity, what problem are you trying to solve?

Re: Local Privilege Escalation

2018-09-26 Thread Eduardo Bustamante
On Wed, Sep 26, 2018 at 4:27 PM cjoke wrote: > > Hi, is there a bounty bug program for Bash? AFAIK, there isn't. If you found a security vulnerability in bash, please make sure to disclose it privately to Chet (chet.ra...@case.edu) instead of this public mailing list.

Re: Auto-update program cache feature

2018-10-04 Thread Eduardo Bustamante
On Wed, Oct 3, 2018 at 11:20 PM Jeffrey Walton wrote: (...) > How Bash achieves it is an implementation detail left to the experts. > I made a few suggestions that don't seem to fit well. That's OK > because Bash internals is not my area of expertise. I think it's important to always consider the

Re: Use-After-Free in Bash

2018-10-30 Thread Eduardo Bustamante
On Tue, Oct 30, 2018 at 1:03 PM Corbin Souffrant wrote: (...) > I found a reproducible use-after-free in every version of Bash from > 4.4-5.0beta, that could potentially be used to escape restricted mode. I > say potentially, because I can get it to crash in restricted mode, but I > haven't gone t

Re: [BUG] Bad call to dircolors in /etc/bash.bashrc on LMDE

2018-11-01 Thread Eduardo Bustamante
On Wed, Oct 31, 2018 at 9:52 PM Philip Hudson wrote: (...) > Description: > At line 44 of /etc/bash.bashrc the line > >eval $(dircolors) > > is incorrect: it errors if $SHELL is tcsh. All other calls correctly > specify 'dircolors -b'. > > Note: Arises on Linux Mint Debian Edition 2. I have no

Re: Indices of array variables are sometimes considered unset (or just display an error).

2018-11-05 Thread Eduardo Bustamante
On Mon, Nov 5, 2018 at 6:01 PM Great Big Dot wrote: (...) > > [... A]ccessing the index list of multiple-element arrays > > fails when you append the unset expansion. With single-element > > arrays, it fails iff the element in question contains any special > > characters or whitespace, and thinks

Re: $RANDOM not Cryptographically secure pseudorandom number generator

2018-12-02 Thread Eduardo Bustamante
On Sun, Dec 2, 2018 at 3:14 PM Ole Tange wrote: (...) > Git's use of SHA1 seems to be a prime example of what can go wrong: > https://shattered.io/ What does a PRNG have to do with a hashing function? > Can you elaborate on why you think it is a bad idea to change an > insecure PRNG into a non-b

Re: $RANDOM not Cryptographically secure pseudorandom number generator

2018-12-03 Thread Eduardo Bustamante
On Mon, Dec 3, 2018 at 9:36 AM Greg Wooledge wrote: > > On Mon, Dec 03, 2018 at 05:31:18PM +0100, Ole Tange wrote: > > Luckily I did not just assume that Bash delivers high quality random > > numbers, but I read the source code, and then found that the quality > > was low. I do not think must user

Re: $RANDOM not Cryptographically secure pseudorandom number generator

2018-12-15 Thread Eduardo Bustamante
On Sat, Dec 15, 2018 at 6:08 PM Ole Tange wrote: (...) > But your comment actually emphasizes my point: We _will_ have users > who are naive enough to use $RANDOM in ways you and I would not do, > because we know it is unsafe. > > Let's make those usages a little safer. You know no one is stoppin

Re: Memory continusely increase

2018-12-19 Thread Eduardo Bustamante
+ Adding Abhishek Hi Chen and Abhishek, it seems you might work on the same team since you sent the exact same bug report: - http://lists.gnu.org/archive/html/bug-bash/2018-12/msg00059.html - http://lists.gnu.org/archive/html/bug-bash/2018-12/msg00058.html - http://lists.gnu.org/archive/html/bug-

Re: Bash build issues in `devel' branch due to -Werror compiler flag

2018-12-19 Thread Eduardo Bustamante
On Mon, Dec 17, 2018 at 6:31 AM Chet Ramey wrote: (...) > Good. This is the kind of feedback I want from enabling this option during > the pre-release period. Thanks for taking the time. Thank you! Bash `devel' builds fine for me now.

Re: write() not retried after EINTR in printf and echo

2018-12-25 Thread Eduardo Bustamante
On Tue, Dec 25, 2018 at 12:01 PM Bize Ma wrote: (...) > But, probably, I should just not inform you of what others think given your > upfront rejection to any (constructive) criticism. (..) > Do as you wish, we will still be able to form our own opinion about buggy > code. This is not constructiv

Re: Should [[ -v 1 ]] be supported?

2018-12-27 Thread Eduardo Bustamante
On Thu, Dec 27, 2018 at 4:50 PM Peng Yu wrote: (...) > What I meant in my original email is that I want something for testing > if there is a command line argument (one or more, the exact number > does not matter). $# gives more than that info, because it tells not > only whether is any command li

Re: How to compile hashlib.c for testing?

2018-12-27 Thread Eduardo Bustamante
On Thu, Dec 27, 2018 at 5:15 PM Peng Yu wrote: (...) > Since the main() function is already there, why there is not already > an easy way to compile it? How do you do unit-testing then for the > code? This is very easy to figure out from the source code, right :)? (Hint: there is no "unit" testi

Re: Should [[ -v 1 ]] be supported?

2018-12-27 Thread Eduardo Bustamante
On Thu, Dec 27, 2018 at 5:38 PM Peng Yu wrote: > > > I don't believe that at all. The number of positional parameters is kept > > anyway. It's not recalculated when you compare it to another number, so > > it's just as fast as a simple comparison of two integers. > > Getting the number $# is slow.

Re: Should [[ -v 1 ]] be supported?

2018-12-27 Thread Eduardo Bustamante
On Thu, Dec 27, 2018 at 9:45 PM Peng Yu wrote: (...) > Yes and no. For a particular bash script, you can quantify which bash > features are the most time-consuming. (...) > (...) But you can not profile all the > bash scripts that have ever been written. Since there are only limited > features in

Re: [Help-bash] How to run tests/?

2019-01-01 Thread Eduardo Bustamante
On Tue, Jan 1, 2019 at 10:09 PM Eduardo Bustamante wrote: > > On Tue, Jan 1, 2019 at 9:42 PM Eduardo Bustamante wrote: > > > On Tue, Jan 1, 2019, 8:46 PM Peng Yu, wrote: > >> > >> I got the following errors when I try tests/ in the bash source code. > >&g

Re: Identical function names in bash source code

2019-01-05 Thread Eduardo Bustamante
On Sat, Jan 5, 2019 at 10:25 AM don fong wrote: > > for my 2c, the post seems within the charter. > > quoting from the bug-bash info > page: > > > This list distributes, to the active maintainers of BASH (the Bourne Again > > SHell), bug reports and

Re: Identical function names in bash source code

2019-01-05 Thread Eduardo Bustamante
On Sat, Jan 5, 2019 at 11:38 AM Peng Yu wrote: > > > What would you say the "suggested improvement" is here? > > This is implied. If it is agreed that identical function names are not > good by the majority of bash developers, then what I found could be > turned into an explicit suggestion. > > Si

Re: $RANDOM not Cryptographically secure pseudorandom number generator

2019-01-05 Thread Eduardo Bustamante
On Sat, Jan 5, 2019 at 12:12 PM Eduardo A. Bustamante López wrote: (...) > 2. Performance impact > > The new RNG does more work, and thus, it is expected to have a performance > impact when generating lots of random numbers. I tested 3 systems (2 amd64 > and 1 > armhf) and include the results bel

Re: Probable recursion in particular alias

2019-01-09 Thread Eduardo Bustamante
On Wed, Jan 9, 2019 at 4:59 AM Ante Perić wrote: (...) > Description: > Having an alias of type: > alias bug="\ >echo \"no output, 100% cpu\" \ > " > in .bashrc will give no output, will not complete, and it will peg the CPU to > 100%. Can you share the output of (right aft

Re: Sourcing a script from a pipe is not reliable

2019-01-09 Thread Eduardo Bustamante
On Wed, Jan 9, 2019 at 10:54 PM Jeremy wrote: (...) > 3.2.57(1)-release (x86_64-apple-darwin15) > > > This is on MacOS 10.11.6. If there is a better place for me to report this > bug, please let me know. Have you tried the latest version? Bash 5.0 was just released: https://lists.gnu.org/archive/

Re: bug: illegal function name?

2019-01-20 Thread Eduardo Bustamante
On Sun, Jan 20, 2019 at 10:46 AM Andrey Butirsky wrote: > > I'm not quite understand what exactly is "intentional". Accepting different sets of function names (when POSIX mode is either on/off). > The problem is inconsistent behavior of unset '-f' flag for "normal" and > "not-normal" function na

Re: bug: illegal function name?

2019-01-20 Thread Eduardo Bustamante
On Sun, Jan 20, 2019 at 11:05 AM Andrey Butirsky wrote: > > Eduardo, the question is about inconsistent, error-prone implementation. > Not about the workarounds. What's the error prone part? - Declare a function name - Unset it with 'unset -f'

Re: General Associative Array problem -- Was: UUID as Array Keys strangely not possible

2019-02-22 Thread Eduardo Bustamante
On Fri, Feb 22, 2019 at 3:24 AM Robert White wrote: (...) > tail --lines=+3 /proc/partitions | grep -v ram | > while read -a RECORD > do (...) > eval [${INLINE[UUID]}]=boo (...) > done > > echo " Keys: " "${![@]}" = "${[@]}" > echo " Keys: " "${![@]}" = "${[@]}" >

Re: Using Source within Binary Shell Scripts

2019-03-27 Thread Eduardo Bustamante
On Wed, Mar 27, 2019 at 8:17 AM Jason Hall wrote: (...) > The point is, their is a legitimate use for sourcing Binary Shell > Scripts (...) Is it really a legitimate use? If you're doing it for "security" (by obscurity I guess?), it's easy to defeat. > and BASH as is, won't let you do this. May

Re: building bash 5.x problems+coredumps

2019-07-08 Thread Eduardo Bustamante
On Mon, Jul 8, 2019 at 3:44 PM L A Walsh wrote: > > This hasn't worked for me yet, that I remember. Some of itt may be in some > library I'm linking, but not sure what might be causing the problem. Can you provide more information about your environment? - Compiler & version version - "configur

Re: alias problem -- conflict found

2019-07-12 Thread Eduardo Bustamante
Can we please STOP this thread? What is the point? Linda will never change her mind. You all are just wasting time and electricity. (and spamming the mailing list with this non-sense).

Re: Incorrect passing of argc argv with multiple redirects

2019-07-30 Thread Eduardo Bustamante
On Tue, Jul 30, 2019 at 10:35 AM Morgan McClure wrote: (...) > ./a.out foo > /dev/null 2&>1; echo $? > returns 3 NOT as expected Are you 100% certain the `2&>1` redirection means what you think it means? (hint: I recommend reading the "Redirecting Standard Output and Standard Error" section o

Re: Wrong explanation of getopts

2019-09-15 Thread Eduardo Bustamante
On Sun, Sep 15, 2019 at 12:58 PM Roland Illig wrote: > > The help text of getopts says: > > > Getopts normally parses the positional parameters ($0 - $9), but if > > more arguments are given, they are parsed instead. (...) > The "instead" in "they are parsed instead" is totally wrong. $1 to $9

Re: Disable microsoft telemetry

2019-10-20 Thread Eduardo Bustamante
On Sun, Oct 20, 2019 at 4:55 AM Gerard E. Seibert wrote: > > On Fri, 18 Oct 2019 18:17:27 +0330, Behrooz Amoozad stated: > >I'm not sure if this even fits here, but it would be really nice if the > >default bashrc included DOTNET_CLI_TELEMETRY_OPTOUT='true'. > >Currently, After installing microsof

Re: Seg history

2019-10-22 Thread Eduardo Bustamante
On Tue, Oct 22, 2019 at 6:09 AM younes berramdane wrote: > > Hello, > I have found a seg in the history of bash while I was doing a project for my > school, > (Put fc -s at the last command of the history file [~/.sh_history] for bash > posix or [~/.bash_history] for bash then launch bash and ex

Re: First lines of examples/startup-files/bashrc

2020-04-08 Thread Eduardo Bustamante
On Wed, Apr 8, 2020 at 2:42 PM Martin Schulte wrote: (...) > But, as far as I understand, a non-interactive bash doesn't read > ~/.bashrc at all - so shouldn't we just omit them? There are exceptions. One of them being SSH, see: https://git.savannah.gnu.org/cgit/bash.git/tree/shell.c?h=ea31c00845

Re: looking for consistent C-c trap behavior

2020-04-17 Thread Eduardo Bustamante
On Fri, Apr 17, 2020 at 12:59 PM gentoo_eshoes--- via Bug reports for the GNU Bourne Again SHell wrote: > > I've noticed that if I trap SIGINT in a bash script, the behavior when > encountering C-c depends on whether an external command (eg. 'sleep 100') or > a builtin command (like 'read -p') w

Re: looking for consistent C-c trap behavior

2020-04-17 Thread Eduardo Bustamante
On Fri, Apr 17, 2020 at 1:09 PM Greg Wooledge wrote: > > On Fri, Apr 17, 2020 at 01:02:20PM -0700, Eduardo Bustamante wrote: > > On Fri, Apr 17, 2020 at 12:59 PM gentoo_eshoes--- via Bug reports for > > the GNU Bourne Again SHell wrote: > > > > > > I'v

Re: Bash Reference Mamual

2020-10-17 Thread Eduardo Bustamante
On Sat, Oct 17, 2020 at 3:48 PM Craig H Maynard wrote: > Hi, > > In section 3.5.4 "Command Substitution", the following sentence may have a > typo: > > > The command substitution $(cat file) can be replaced by the equivalent > but faster $(< file). > > > My proposed change: > > > The command subs

Re: echo $'\0' >a does not write the nul byte

2021-01-17 Thread Eduardo Bustamante
On Sun, Jan 17, 2021 at 12:05 PM wrote: > (...) > The nul byte is not echoed by $'\0'. This is expected. Bash uses NUL-byte terminated character sequences to store strings, so it can't actually store NUL bytes themselves. $'\0' is the same as '' (i.e. an empty string). If you want to o

Re: obscure bug "extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));"

2021-01-21 Thread Eduardo Bustamante
On Thu, Jan 21, 2021 at 1:28 PM Mathias Steiger wrote: > > > No. > > If you read the the rest of the bug report, it might become clearer to you. > > > Suppose I wrote a simple script: > > {if echo "27ac5e2f757302" >& /dev/null; then echo "yes"; else echo > "no"; fi } > output Did you mean:

Re: obscure bug "extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));"

2021-01-21 Thread Eduardo Bustamante
On Thu, Jan 21, 2021 at 1:32 PM Eduardo Bustamante wrote: > > On Thu, Jan 21, 2021 at 1:28 PM Mathias Steiger > wrote: > > > > > > No. > > > > If you read the the rest of the bug report, it might become clearer to you. > > > > > &g

Re: obscure bug "extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));"

2021-01-21 Thread Eduardo Bustamante
On Thu, Jan 21, 2021 at 2:07 PM Mathias Steiger wrote: > > > As such bugs are likely related to buffer issues, maybe even in > underlying APIs, and since they only surface after very lengthy > mysterious sequences of commands - often just on single specific system > installations - I wouldn't know

Re: the bugs on simplificied code didnt appear im sorry check up the old paste or let it be

2021-02-02 Thread Eduardo Bustamante
On Tue, Feb 2, 2021 at 12:52 PM Alex fxmbsw7 Ratchev wrote: > > bash-5.1# n=1 bash ../ixz/paster desc 0 1 2 3 > ++ paste BEGIN ++ Could you at least use a standard archive format to send these, and not whatever this format is? I doubt you'll get much help when the first step is to piece together

Re: Regression with declare -i and arrays

2015-04-03 Thread Eduardo Bustamante
t = list->next; continue > +#define NEXT_VARIABLE() do { free (name); list = list->next; continue; } > while(0) > >/* There are arguments left, so we are making variables. */ >while (list) /* declare [-aAfFirx] name [name ...] */ > > -- > Eduardo Bustamante > https://dualbus.me/ >

Re: Curious case statement error

2016-08-13 Thread Eduardo Bustamante
Character ranges are locale-dependant. Check the values of LC_ALL and LC_COLLATE. Under some locales, the [A-Z] range is actually AaBb..Z. That's why it's better to use the character classes, i.e. [[:alpha:]], [[:lower:]], [[:upper:]], etc. Unless you set the globasciiranges shopt: globasciiran

Re: Bash bug

2016-08-22 Thread Eduardo Bustamante
You can do: local var; var=$(...); ... $? No need to make the declaration and assignment at the same time.

Re: How bash do tokenization?

2016-10-18 Thread Eduardo Bustamante
Check parser.y

Re: How bash do tokenization?

2016-10-18 Thread Eduardo Bustamante
On Tue, Oct 18, 2016 at 10:18 PM, Eduardo Bustamante wrote: > Check parser.y Sorry, I meant parse.y, inside it you will find read_token and yylex.

Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#length}

2016-10-21 Thread Eduardo Bustamante
what's wrong with?: echo ${#array[@]} It will return: - With array=(1 2 3) -> 3 - With array=() -> 0 - With unset array -> 0 - With declare -a array -> 0 Seems to do what you're looking for.

Re: Race in bash-4.3 'typeset'?

2016-10-25 Thread Eduardo Bustamante
What version of bash are you using Stuart? typeset -p should work for local variables too in any recent bash version.

Re: Race in bash-4.3 'typeset'?

2016-10-25 Thread Eduardo Bustamante
Ah! You're right. The second issue was already reported back in 2015 https://lists.gnu.org/archive/html/bug-bash/2015-02/msg00060.html Now, regarding the SIGPIPE issue. The message bash is printing just means that grep closed the pipe, so the bash process receives a SIGPIPE when attempting to writ

Re: Forcing builtins (interactive, non-interactive shells) to execute in fork()'ed process.

2016-10-26 Thread Eduardo Bustamante
Hi Matthew, I have a couple questions: 1. How are you testing this? (small concrete cases are helpful) 2. Do you have some specific builtins that exhibit that behavior? (it doesn't make sense for builtins to fork on their own, unless you're doing an explicit subshell. Like you mentioned, executin

Re: Severe IFS glob bug needs patch [was: Setting IFS='*' causes bash to freeze on tab completion]

2016-11-03 Thread Eduardo Bustamante
I agree with everything, except calling it severe. This is self-inflicted harm, and easy to work around

Re: Severe IFS glob bug needs patch [was: Setting IFS='*' causes bash to freeze on tab completion]

2016-11-04 Thread Eduardo Bustamante
If you want to split with read, use a tempenv IFS: dualbus@hp:~/local/src/gnu/bash$ bash -c 'IFS="?" read a b c <<< "hello?world?xyz"; echo "$a"' hello If you want to split using word splitting: dualbus@hp:~/local/src/gnu/bash$ bash -c 'v="hello?world?xyz"; IFS="?"; set -- $v; unset

Re: Why does bash use xmalloc?

2016-11-06 Thread Eduardo Bustamante
Hi Peng. Read the link you provided again. xmalloc is not an alternative version of malloc. It's just a common wrapper function around malloc. You can go and see for yourself, the definition is here: http://git.savannah.gnu.org/cgit/bash.git/tree/xmalloc.c#n97 If you want the rest of the commands

Re: Curious... on readline history patch -- round up memory allocs?

2016-11-15 Thread Eduardo Bustamante
I think this is unnecessary, malloc (either the bash malloc in lib/malloc/malloc.c or the libc provided malloc) should already take care of requesting memory in page sized chunks. At least that's what I see here (morecore function): http://git.savannah.gnu.org/cgit/bash.git/tree/lib/malloc/malloc.

Re: Curious... on readline history patch -- round up memory allocs?

2016-11-15 Thread Eduardo Bustamante
The change was in reference to this bug report: http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00107.html The problem was that bash tried to allocate memory from the start based on the value of HISTSIZE, but this proved problematic for users which used a large HISTSIZE to have unlimited his

Re: here-documents in $(command) substitution

2016-11-27 Thread Eduardo Bustamante
Hi Alexey, Please read the specification of here-documents in the standard: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04 Quoting the relevant parts: The here-document shall be treated as a single word that begins after the next and continues until th

Re: [Bash 4.4.5] Variable indirection, error on empty variable

2016-11-27 Thread Eduardo Bustamante
This change of behavior is the result of a bug fix for http://lists.gnu.org/archive/html/bug-bash/2015-08/msg00058.html, introduced in the following commit http://git.savannah.gnu.org/cgit/bash.git/commit/?id=f2d7e1a3bcbdec7ef09db71779d800237fbc58bb (read the changelog in CWRU/CWRU.chlog) A couple

Re: Not operator (~) fail on arithmetic expansion.

2016-11-27 Thread Eduardo Bustamante
Except that this is *inside* arithmetic context. Bash is definitely doing something wrong here: dualbus@hp:~$ for sh in bash zsh ksh93 mksh dash posh; do $sh -c 'echo $0 $((~0))' $sh; done bash: /home/dualbus: syntax error: operand expected (error token is "/home/dualbus") zsh -1 ksh93 -1 mksh -1

Re: Could bash do what make does?

2016-11-28 Thread Eduardo Bustamante
Why should bash do what make already does?

  1   2   3   >