Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security
uname output: Linux debian 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.0
Patch Level: 0
Release Status: release

Description:
When I run "valgrind bash valgrind_issue.sh" on my up-to-date Debian stretch, then valgrind shows invalid read errors and an assertion in malloc.c fails. At first, I observed this in the default bash & valgrind that ships with Debian: - bash --version: GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
        - valgrind --version:  valgrind-3.12.0.SVN
Then I reproduced it with the latest bash and valgrind (see attached log file): - bash --version: GNU bash, version 5.0.0(3)-release (x86_64-pc-linux-gnu)
        - valgrind --version:  valgrind-3.15.0
        The problem does not reproduce on my RHEL 7.6.
It also reproduces on my second Debian stretch. The content of valgrind_issue.sh:
        #!/bin/bash
        for aFile in *; do
            echo "aFile=$aFile"
        done

Repeat-By:
        - Log into a Debian stretch
        - Execute: valgrind bash valgrind_issue.sh

Fix:

<<attachment: bash_valgrind_issue.zip>>

Reply via email to