Note: The version embeded in 16.04 does not have the bug (although it is bash 4.3) but the next releases has it (tested on 18.04 and 19.10). Also tested on Debian Buster.
-- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to bash in Ubuntu. https://bugs.launchpad.net/bugs/1860133 Title: Memory leak on set_default_locale Status in bash package in Ubuntu: New Bug description: Hello, I heavily use ubuntu as a build platform to build and package C/C++ components. Some components are checked in a valgrind environment. On some of them, I am reported with the described memory leak due to bash. It seems this bug has been fixed in other distros but not in Debian nor Ubuntu. There is an old bug from bash 4.3 which can be reproduce easily that way: ``` $ valgrind --leak-check=full /bin/bash -c 'exit 0' ... ==565== 2 bytes in 1 blocks are definitely lost in loss record 14 of 269 ==565== at 0x483577F: malloc (vg_replace_malloc.c:299) ==565== by 0x195E8D: xmalloc (in /bin/bash) ==565== by 0x18F51A: set_default_locale (in /bin/bash) ==565== by 0x135EE6: main (in /bin/bash) ... ``` This has been fixed in fedora that way (and the patch is still here in the latest RPMs): ``` >cat bash-4.3-memleak-lc_all.patch diff -up bash-4.3/locale.c.old bash-4.3/locale.c --- bash-4.3/locale.c.old 2015-07-15 11:55:00.002857301 +0200 +++ bash-4.3/locale.c 2015-07-15 11:48:36.698086257 +0200 @@ -77,8 +77,6 @@ set_default_locale () { #if defined (HAVE_SETLOCALE) default_locale = setlocale (LC_ALL, ""); - if (default_locale) - default_locale = savestring (default_locale); #endif /* HAVE_SETLOCALE */ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); ``` Do you think it is worth integrating that kind of patch in your package ? Regards, Stac To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1860133/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp