bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error message garbage when parameter expansion used inside (()) and


From: Chet Ramey
Subject: Re: Error message garbage when parameter expansion used inside (()) and variable unset
Date: Wed, 4 Apr 2018 09:51:13 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 4/3/18 7:07 PM, PRussell wrote:
> Hi,
> 
> The error seems to be localized to the expansion of PS4 when "set -x" is 
> active.
> 
> Please see sample script below.
> 
> I am aware of the unusual parameter expansion for FUNCNAME.  There might be a 
> local historical reason. :-)
> 
> It does not happen outside of the PS4 expansion. It also behaves differently 
> on 4.3 vs 4.4. 
> 
> On 4.4, valgrind shows "Invalid Reads".
> On 4.3, valgrind shows no errors.
> 
> I included below a small part of valgrind's output. If you need more let me 
> know.

I ran this script using bash-4.4.19, built from the distribution, on Ubuntu
16.04 (valgrind 3.11), and got no error reports. It might be a valgrind
problem.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]