bug-bash
[Top][All Lists]
Advanced

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

Re: Valgrind detects invalid read in bash. malloc assertion fails.


From: Chet Ramey
Subject: Re: Valgrind detects invalid read in bash. malloc assertion fails.
Date: Tue, 14 May 2019 09:46:10 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 5/14/19 2:16 AM, Grisha Levit wrote:
> Reproduces for me on Debian 9 with a fresh bash devel build (with or
> without DEBUG and MALLOC DEBUG). Anything with a glob will do to reproduce:
> 
> $ valgrind ./bash -c ': *'

chet@caleb-debian9:~$ ./build/bash-5.0.7/bash -c ': *'
chet@caleb-debian9:~$ echo $?
0
chet@caleb-debian9:~$ cat /etc/debian_version
9.9
chet@caleb-debian9:~$ ulimit -c unlimited
chet@caleb-debian9:~$ ./build/bash-5.0.7/bash -c ': *'
chet@caleb-debian9:~$ echo $?
0
chet@caleb-debian9:~$ ./build/bash-5.0.7/bash -c 'echo $BASH_VERSION'
5.0.7(1)-release
chet@caleb-debian9:~$

If bash were freeing unallocated memory, the bash malloc would catch it.
I assume this is a valgrind false positive.

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



reply via email to

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