Public bug reported:

With the latest version of libtar-dev we experience a memory leak in
tar_extract_all:


=================================================================
==6220==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 210 byte(s) in 3 object(s) allocated from:
    #0 0x55ba703efef3 in malloc 
(/workspace/neurolf/reconstruction/build/test/nlf.reconstruction.tests.asan+0x223ef3)
 (BuildId: ded9f53a2ca01f37e39a5b822e741d09a47a8d5a)
    #1 0x7f4213ab5adb in tar_extract_all 
(/lib/x86_64-linux-gnu/libtar.so.0+0x7adb) (BuildId: 
1fcb4fd704977c2ac6961369fbe73883bd0eac9c)
    #2 0x55ba70b698de in 
nlf::support::files::TarFile::extractFilesToDir(std::filesystem::__cxx11::path) 
const /workspace/neurolf/shared/support/files/TarFile.cpp:89:9
    #3 0x55ba704f39f2 in 
TestClientTomographicCalibration::testDetectorEfficiencyNormalizationSucceeds() 
/workspace/neurolf/reconstruction/test/unit/TomographicCalibrationTests.cpp:110:24
    #4 0x55ba704f9205 in CATCH2_INTERNAL_TEST_2() 
/workspace/neurolf/reconstruction/test/unit/TomographicCalibrationTests.cpp:220:19
    #5 0x55ba7131f2de in Catch::RunContext::runCurrentTest() 
(/workspace/neurolf/reconstruction/build/test/nlf.reconstruction.tests.asan+0x11532de)
 (BuildId: ded9f53a2ca01f37e39a5b822e741d09a47a8d5a)


When I downgrade libtar from 1.2.20-8.1ubuntu0.24.10.1 to 1.2.20-8.1build1, 
everything works fine:


root@613fb03bab38:/workspace/neurolf/reconstruction# apt-get install 
libtar0t64=1.2.20-8.1build1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  libtar0t64
0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
Need to get 18.0 kB of archives.
After this operation, 62.5 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble/universe amd64 libtar0t64 amd64 
1.2.20-8.1build1 [18.0 kB]
Fetched 18.0 kB in 0s (129 kB/s)     
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libtar0t64:amd64.
(Reading database ... 97815 files and directories currently installed.)
Preparing to unpack .../libtar0t64_1.2.20-8.1build1_amd64.deb ...
Unpacking libtar0t64:amd64 (1.2.20-8.1build1) ...
Setting up libtar0t64:amd64 (1.2.20-8.1build1) ...
Processing triggers for libc-bin (2.39-0ubuntu8.4) ...

root@613fb03bab38:/workspace/neurolf/reconstruction# apt-get install 
libtar-dev=1.2.20-8.1build1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  libtar-dev
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
Need to get 36.9 kB of archives.
After this operation, 127 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble/universe amd64 libtar-dev amd64 
1.2.20-8.1build1 [36.9 kB]
Fetched 36.9 kB in 0s (339 kB/s)     
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libtar-dev:amd64.
(Reading database ... 97821 files and directories currently installed.)
Preparing to unpack .../libtar-dev_1.2.20-8.1build1_amd64.deb ...
Unpacking libtar-dev:amd64 (1.2.20-8.1build1) ...
Setting up libtar-dev:amd64 (1.2.20-8.1build1) ...

** Affects: libtar (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2107447

Title:
  memory leak in tar_extract_all

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libtar/+bug/2107447/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to