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: