bash - reproducible SEGFAULT on rapid SIGINTs

2024-08-28 Thread Tycho Kirchner
Hi, Sending rapid SIGINTs from another shell quickly results in a SEGFAULT of the bash instance receiving them. Steps to reproduce: * Open up a shell SHELL_1 and record its pid, e.g. "echo $$" * Launch another shell and send rapid SIGINTs: while true ; do kill -INT OTHER_PID; done SHELL_1 quick

Re: bash passes changed termios to backgrounded process(es) groups?

2024-08-28 Thread Chet Ramey
On 8/27/24 7:46 PM, Steffen Nurpmeso wrote: Hello. I got a bug report for my mailer which stated $ ( echo blah | Mail root ) & [1] 2754649 $ ^M^M^M^M^C^C [1]+ Stopped ( echo blah | Mail root ) $ fg ( echo blah | Mail root ) $ I turns out i answered hi

Re: Out of bounds read in parse.y.

2024-08-28 Thread Chet Ramey
On 8/27/24 3:58 PM, Collin Funk wrote: I suspect there is a decrement that isn't matched by a call to set_word_top(). But a reproducer would help, otherwise we're all just guessing. Sure, the bad read was happening while reading my .profile and .bashrc file. I've narrowed it down to a bash com

Re: Surprising results when profiling Bash

2024-08-28 Thread Chet Ramey
On 8/24/24 1:46 PM, Martin D Kealey wrote: I've been making some tentative patches to the `devel` branch, and since I have a fairly large bashrc, when I compile Bash with maximal debugging support, its startup is ... underwhelmingly slothful. You're seeing the memory tracing and debugging code.

Re: Bash History Behavior Suggestion

2024-08-28 Thread Chet Ramey
On 8/20/24 1:42 AM, supp...@eggplantsd.com wrote: I know it can.  The suggestion is that the default behavior needs some work: The default behavior provides mostly mechanism, not policy. There are ways to do what you want, but those are not suitable for (or desired by) everyone. So you can chan

Re: Bash History Behavior Suggestion

2024-08-28 Thread Chet Ramey
On 8/20/24 2:20 PM, supp...@eggplantsd.com wrote: The problem with the tagged format is that it's *not* usable by grep Awk would have no problem with it. limited to exactly whatever magic is built into the "history" command That's where the magic should be.  If that were the official interf

Re: bash passes changed termios to backgrounded process(es) groups?

2024-08-28 Thread Steffen Nurpmeso
Chet Ramey wrote in <3ca901aa-5c5e-4be3-9a71-157d7101f...@case.edu>: |On 8/27/24 7:46 PM, Steffen Nurpmeso wrote: |> Hello. |> |> I got a bug report for my mailer which stated |> |> $ ( echo blah | Mail root ) & |>[1] 2754649 |> $ ^M^M^M^M^C^C |> |>[1]+ Stopped

Re: Out of bounds read in parse.y.

2024-08-28 Thread Collin Funk
Chet Ramey writes: > Thanks. Here's the simple reproducer: > > x() > { > case y in > z) > if (! false); then > foo=bar > fi > ;; > esac > } > > > It was what I suspected. Ah, nice! Thank you for the help. Collin

Re: Question on $@ vs $@$@

2024-08-28 Thread Robert Elz
Date:Wed, 28 Aug 2024 02:03:54 +0200 From:Steffen Nurpmeso Message-ID: <20240828000354.qZaQvm7v@steffen%sdaoden.eu> | That confuses me again, unfortunately i got a bug report and | distracted. I mean, i would | | 1. skip leading whitespace anyhow (IFS or not,

Re: bash passes changed termios to backgrounded process(es) groups?

2024-08-28 Thread Martin D Kealey
On Thu, 29 Aug 2024 at 06:12, Steffen Nurpmeso wrote: > Chet Ramey wrote in > <3ca901aa-5c5e-4be3-9a71-157d7101f...@case.edu>: > |On 8/27/24 7:46 PM, Steffen Nurpmeso wrote: > |> ..and it seems that if bash starts a normal process then ICRNL is > |> set, but if it starts a (process)& or only

Patch to unify shopt & set-o

2024-08-28 Thread Martin D Kealey
Hi Chet On Wed, 28 Aug 2024 at 23:58, Chet Ramey wrote: > On 8/24/24 1:46 PM, Martin D Kealey wrote: > > I've been making some tentative patches to the `devel` branch, and since > I > > have a fairly large bashrc, when I compile Bash with maximal debugging > > support, its startup is ... underwh