Re: unreliable value of LINENO variable

2023-12-04 Thread Phi Debian
Confirmed on Ubuntu 22.04.3 LTS -- $ cat ~/yo.sh echo $BASH_VERSION echo 0 $LINENO if ((1)); then ( : ) | : ; echo 1 $LINENO fi echo 2 $LINENO $ for s in bash ./bash ksh zsh > do printf "\n$s\n" ; $s ~/yo.sh > done bash 5.1.16(1)-release 0 2 1 4 2 5

Re: bash encountered a coredump issue with stepping on memory

2023-12-04 Thread Chet Ramey
On 12/4/23 9:38 AM, wang yuhang via Bug reports for the GNU Bourne Again SHell wrote: A bash coredump has appeared in my environment, the stack information displayed by GDB is as follows: [...] the problematic bash version is 5.1.8 Hi. This appears to happen when creating a shell v

Re: Idea: jobs(1) -i to print only :%ID:s

2023-12-04 Thread Steffen Nurpmeso
Chet Ramey wrote in <7402031f-424c-4766-ba70-71771c9dc...@case.edu>: |On 11/8/23 8:12 PM, Steffen Nurpmeso wrote: |> The "problem" with the current way bash is doing it is that bash's |> job handling does not recognize jobs die under the hood: |> |>$ jobs |>[1]- Stopped

Re: unreliable value of LINENO variable

2023-12-04 Thread Giacomo Comes
On Mon, Dec 04, 2023 at 12:21:11PM -0500, Chet Ramey wrote: > On 12/4/23 8:46 AM, Giacomo Comes wrote: > > I use often the value of LINEO in order > > to know where to look for issues in a script. > > Recently I discovered a bug. > > > > Please consider the following 6 line script: > >

Re: unreliable value of LINENO variable

2023-12-04 Thread alex xmb sw ratchev
i ve experienced many ghost fails .. got better over time and knowerledge greets On Mon, Dec 4, 2023, 18:21 Chet Ramey wrote: > On 12/4/23 8:46 AM, Giacomo Comes wrote: > > I use often the value of LINEO in order > > to know where to look for issues in a script. > > Recently I discovered a bug.

Re: unreliable value of LINENO variable

2023-12-04 Thread Chet Ramey
On 12/4/23 8:46 AM, Giacomo Comes wrote: I use often the value of LINEO in order to know where to look for issues in a script. Recently I discovered a bug. Please consider the following 6 line script: #!/bin/bash if ((1)); then ( : ) ; ec

bash encountered a coredump issue with stepping on memory

2023-12-04 Thread wang yuhang
Hi A bash coredump has appeared in my environment, the stack information displayed by GDB is as follows: #0 __pthread_kill_implementation (threadid=

unreliable value of LINENO variable

2023-12-04 Thread Giacomo Comes
I use often the value of LINEO in order to know where to look for issues in a script. Recently I discovered a bug. Please consider the following 6 line script: #!/bin/bash if ((1)); then ( : ) ; echo 1 $LINENO fi echo 2 $LINENO -