bug-bash
[Top][All Lists]
Advanced

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

Memory Leak detected when using bash arrays as local variable in a funct


From: remi salard
Subject: Memory Leak detected when using bash arrays as local variable in a function
Date: Tue, 05 Jul 2016 21:29:03 +0200
User-agent: KMail/4.14.1 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; )

Configuration Information:
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'$
uname output: Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 
(2016-04-08) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.3
Patch Level: 30
Release Status: release

Description:
        Hello,

        I observed a memory leak when a bash array is created as a local 
variable inside a function.

        Regards,

        RĂ©mi

Repeat-By:

        The following code (from 
http://bug-bash.gnu.narkive.com/DaBdE5P0/memory-leak-on-arrays-in-functions) 
shows this 
regression:

#!/bin/bash
run() { local -a A=(); local -a A=(); }
while :; do run; done





reply via email to

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