Re: BASH_SOURCE contains incorrect information in Bash 5.3.0
From:
Luca Saiu
Subject:
Re: BASH_SOURCE contains incorrect information in Bash 5.3.0
Date:
Fri, 8 Aug 2025 20:41:04 +0000
User-agent:
pEp-mail-tool with Gnus v5.13, GNU Emacs 31.0.50, GNU/Linux x86_64-pc-linux-gnu
Hello Chet, and thanks for looking into this.
On 2025-08-08 at 13:31 +0000, Chet Ramey wrote:
> I can't reproduce it. [...]
After your reply I tried again recompiling Bash 5.3 from scratch and
indeed I could no longer reproduce the problem with that.
But then I tried rebuilding 5.3 the way I was doing when I noticed the
problem, and from that build I can reliably reproduce the issue again.
If I configure this way I see the problem again. From the source
directory:
--8<---------------cut here---------------start------------->8---
[luca@hennessy /tmp/asdasdasd/bash-5.3]$ ./configure --disable-profiling
--disable-debugger --disable-nls --disable-rpath CFLAGS='-O0 -g -fPIC' && make
--8<---------------cut here---------------end--------------->8---
Installation is not necessary. From the source / build directory:
--8<---------------cut here---------------start------------->8---
[luca@hennessy /tmp/asdasdasd/bash-5.3]$ ./bash ~/bash-stack-trace
BASH_VERSION: 5.3.0(1)-release
FUNCNAME: 'f' 'g' 'g' 'g' 'g' 'main'
BASH_SOURCE: '' '' '' '' '' '/home/luca/bash-stack-trace'
--8<---------------cut here---------------end--------------->8---
Valgrind reports nothing.
I cannot do it now, but later I will try to narrow down which configure
option is the culprit.
Am I doing something obviously illegitimate at configure time? I would
say no.
Regards,
--
Luca Saiu https://ageinghacker.net
GNU Jitter https://www.gnu.org/software/jitter
GNU epsilon https://www.gnu.org/software/epsilon
pEp-mail-tool https://codeberg.org/pEp/pEp-mail-tool
I support everyone's freedom of mocking any opinion or belief, no
matter how deeply held, with open disrespect and the same unrelented
enthusiasm of a toddler who has just learned the word "poo".