Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -g -O2 -Wall uname output: Linux sasaka.net 2.6.32-5-amd64 #1 SMP Fri Sep 17 21:50:19 UTC 2010 x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu
Bash Version: 4.1 Patch Level: 5 Release Status: release Description: It seems that there is memory leak in brace expansion. The memory used by bash interpreter gets larger and larger when running this script: #!/bin/bash foo=bar.txt while true do echo ${foo##*.} done However, the program works fine should the brace expansion be changed to ${foo}. So, the cause of the leak must be at the ${foo##*.} Repeat-By: Run this script: #!/bin/bash foo=bar.txt while true do echo ${foo##*.} done