Bug 358980 - 32 byte leak reported when code uses dlopen and links against pthread
Summary: 32 byte leak reported when code uses dlopen and links against pthread
Status: RESOLVED WORKSFORME
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.11.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-04 13:13 UTC by kdebugzilla
Modified: 2024-12-26 09:26 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kdebugzilla 2016-02-04 13:13:32 UTC
Trivial program reports 32 byte memory leak when it's linked against libdl an libpthread.

Several command outputs:

$ uname -a
Linux Calmarius 3.13.0-77-generic #121-Ubuntu SMP Wed Jan 20 10:50:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.3 LTS
Release:	14.04
Codename:	trusty

$ gcc -v
Reading specs from /usr/lib/gcc/x86_64-linux-gnu/4.8/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc driver version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) executing gcc version 4.8.1

Consider this trivial program:

#include <dlfcn.h>

int main()
{
    void* handle = 0;

    handle = dlopen("libm.so", RTLD_NOW);
    dlclose(handle);    
    
    return 0;
}

Compile this program with this command line:

$ gcc -Wl,--no-as-needed -g -fPIC -o stuff  main.c -ldl -lpthread

The -Wl,--no-as-needed is crucial as it won't link against the specified libraries otherwise.

Then just run valgrind:

$ valgrind -v --leak-check=full --show-reachable=yes ./stuff
==4995== Memcheck, a memory error detector
==4995== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==4995== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==4995== Command: ./stuff
==4995== 
--4995-- Valgrind options:
--4995--    -v
--4995--    --leak-check=full
--4995--    --show-reachable=yes
--4995-- Contents of /proc/version:
--4995--   Linux version 3.13.0-77-generic (buildd@lcy01-30) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #121-Ubuntu SMP Wed Jan 20 10:50:42 UTC 2016
--4995-- 
--4995-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-rdtscp-sse3-avx
--4995-- Page sizes: currently 4096, max supported 4096
--4995-- Valgrind library directory: /usr/local/lib/valgrind
--4995-- Reading syms from /home/dcsirmaz/workdir/crucible/dlopen/stuff
--4995-- Reading syms from /lib/x86_64-linux-gnu/ld-2.19.so
--4995--   Considering /lib/x86_64-linux-gnu/ld-2.19.so ..
--4995--   .. CRC mismatch (computed 4cbae35e wanted 8d683c31)
--4995--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.19.so ..
--4995--   .. CRC is valid
--4995-- Reading syms from /usr/local/lib/valgrind/memcheck-amd64-linux
--4995--    object doesn't have a dynamic symbol table
--4995-- Scheduler: using generic scheduler lock implementation.
--4995-- Reading suppressions file: /usr/local/lib/valgrind/default.supp
==4995== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-4995-by-dcsirmaz-on-???
==4995== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-4995-by-dcsirmaz-on-???
==4995== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-4995-by-dcsirmaz-on-???
==4995== 
==4995== TO CONTROL THIS PROCESS USING vgdb (which you probably
==4995== don't want to do, unless you know exactly what you're doing,
==4995== or are doing some strange experiment):
==4995==   /usr/local/lib/valgrind/../../bin/vgdb --pid=4995 ...command...
==4995== 
==4995== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==4995==   /path/to/gdb ./stuff
==4995== and then give GDB the following command
==4995==   target remote | /usr/local/lib/valgrind/../../bin/vgdb --pid=4995
==4995== --pid is optional if only one valgrind process is running
==4995== 
--4995-- REDIR: 0x4019ca0 (ld-linux-x86-64.so.2:strlen) redirected to 0x38056b11 (vgPlain_amd64_linux_REDIR_FOR_strlen)
--4995-- Reading syms from /usr/local/lib/valgrind/vgpreload_core-amd64-linux.so
--4995-- Reading syms from /usr/local/lib/valgrind/vgpreload_memcheck-amd64-linux.so
==4995== WARNING: new redirection conflicts with existing -- ignoring it
--4995--     old: 0x04019ca0 (strlen              ) R-> (0000.0) 0x38056b11 vgPlain_amd64_linux_REDIR_FOR_strlen
--4995--     new: 0x04019ca0 (strlen              ) R-> (2007.0) 0x04c2dc80 strlen
--4995-- REDIR: 0x4019a50 (ld-linux-x86-64.so.2:index) redirected to 0x4c2d830 (index)
--4995-- REDIR: 0x4019c70 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c2edd0 (strcmp)
--4995-- REDIR: 0x401a9c0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c31e10 (mempcpy)
--4995-- Reading syms from /lib/x86_64-linux-gnu/libdl-2.19.so
--4995--   Considering /lib/x86_64-linux-gnu/libdl-2.19.so ..
--4995--   .. CRC mismatch (computed c1315e8c wanted 37097b60)
--4995--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libdl-2.19.so ..
--4995--   .. CRC is valid
--4995-- Reading syms from /lib/x86_64-linux-gnu/libpthread-2.19.so
--4995--   Considering /lib/x86_64-linux-gnu/libpthread-2.19.so ..
--4995--   .. CRC mismatch (computed d568bf33 wanted fb00d679)
--4995--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libpthread-2.19.so ..
--4995--   .. CRC is valid
--4995-- Reading syms from /lib/x86_64-linux-gnu/libc-2.19.so
--4995--   Considering /lib/x86_64-linux-gnu/libc-2.19.so ..
--4995--   .. CRC mismatch (computed dc620abc wanted 148cbd6e)
--4995--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so ..
--4995--   .. CRC is valid
--4995-- REDIR: 0x52e5d60 (libc.so.6:strcasecmp) redirected to 0x4a25706 (_vgnU_ifunc_wrapper)
--4995-- REDIR: 0x52e8050 (libc.so.6:strncasecmp) redirected to 0x4a25706 (_vgnU_ifunc_wrapper)
--4995-- REDIR: 0x52e5530 (libc.so.6:memcpy@GLIBC_2.2.5) redirected to 0x4a25706 (_vgnU_ifunc_wrapper)
--4995-- REDIR: 0x52e37c0 (libc.so.6:rindex) redirected to 0x4c2d510 (rindex)
--4995-- REDIR: 0x52dc220 (libc.so.6:calloc) redirected to 0x4c2c8fe (calloc)
--4995-- REDIR: 0x52db750 (libc.so.6:malloc) redirected to 0x4c2ab96 (malloc)
--4995-- Reading syms from /lib/x86_64-linux-gnu/libm-2.19.so
--4995--   Considering /lib/x86_64-linux-gnu/libm-2.19.so ..
--4995--   .. CRC mismatch (computed a46ef660 wanted 767bfa33)
--4995--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.19.so ..
--4995--   .. CRC is valid
--4995-- Discarding syms at 0x5a23610-0x5a921b6 in /lib/x86_64-linux-gnu/libm-2.19.so due to munmap()
--4995-- REDIR: 0x52dbdf0 (libc.so.6:free) redirected to 0x4c2bcb0 (free)
==4995== 
==4995== HEAP SUMMARY:
==4995==     in use at exit: 32 bytes in 1 blocks
==4995==   total heap usage: 6 allocs, 5 frees, 1,524 bytes allocated
==4995== 
==4995== Searching for pointers to 1 not-freed blocks
==4995== Checked 102,648 bytes
==4995== 
==4995== 32 bytes in 1 blocks are still reachable in loss record 1 of 1
==4995==    at 0x4C2C994: calloc (vg_replace_malloc.c:711)
==4995==    by 0x4E3868F: _dlerror_run (dlerror.c:141)
==4995==    by 0x4E380C0: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==4995==    by 0x40066D: main (main.c:7)
==4995== 
==4995== LEAK SUMMARY:
==4995==    definitely lost: 0 bytes in 0 blocks
==4995==    indirectly lost: 0 bytes in 0 blocks
==4995==      possibly lost: 0 bytes in 0 blocks
==4995==    still reachable: 32 bytes in 1 blocks
==4995==         suppressed: 0 bytes in 0 blocks
==4995== 
==4995== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==4995== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

It looks like it's a regression to me. As this very exact bug was reported before and fixed:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=700899
Comment 1 Ivo Raisr 2017-05-05 14:35:47 UTC
With your small example, I got much more interesting results on Ubuntu 16.10 with gcc 6.3.0 and glibc 2.24.


==24182== Invalid read of size 1
==24182==    at 0x4017251: _dl_close (dl-close.c:817)
==24182==    by 0x40106C3: _dl_catch_error (dl-error.c:187)
==24182==    by 0x4E3B580: _dlerror_run (dlerror.c:163)
==24182==    by 0x4E3AFDE: dlclose (dlclose.c:46)
==24182==    by 0x108748: main (dl.c:6)
==24182==  Address 0x3d4 is not stack'd, malloc'd or (recently) free'd
==24182== 
==24182== 
==24182== Process terminating with default action of signal 11 (SIGSEGV)
==24182==  Access not within mapped region at address 0x3D4
==24182==    at 0x4017251: _dl_close (dl-close.c:817)
==24182==    by 0x40106C3: _dl_catch_error (dl-error.c:187)
==24182==    by 0x4E3B580: _dlerror_run (dlerror.c:163)
==24182==    by 0x4E3AFDE: dlclose (dlclose.c:46)
==24182==    by 0x108748: main (dl.c:6)
Segmentation fault (core dumped)
Comment 2 Ivo Raisr 2017-05-05 14:36:49 UTC
Forgot to say, native program run crashes as well.
Comment 3 leshe4ka 2024-12-12 07:59:50 UTC
Is there any updates on this topic?
https://github.com/leshe4ka46/dlopen-leaks
Here is repo in which i dlopen shared library with Qt linked to it
There is getchar to pause execution
It loads libraries, but not unloads systemd and pcre2
Howether on ubuntu 14 it dont leak

On latest arch it leaks
❯ uname -a
Linux archie 6.12.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 09 Dec 2024 14:31:57 +0000 x86_64 GNU/Linux
❯ ldd --version
ldd (GNU libc) 2.40

❯ cat /proc/119553/maps
5abbe5b9e000-5abbe5ba0000 r--p 00000000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba0000-5abbe5ba6000 r-xp 00002000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba6000-5abbe5ba8000 r--p 00008000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba8000-5abbe5ba9000 r--p 0000a000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba9000-5abbe5bb0000 rw-p 0000b000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5bb0000-5abbe5bb2000 rw-p 00000000 00:00 0 
5abbeaec9000-5abbeaeea000 rw-p 00000000 00:00 0                          [heap]
75eb1db20000-75eb1db44000 r--p 00000000 00:23 4073                       /usr/lib/libc.so.6
75eb1db44000-75eb1dcb5000 r-xp 00024000 00:23 4073                       /usr/lib/libc.so.6
75eb1dcb5000-75eb1dd03000 r--p 00195000 00:23 4073                       /usr/lib/libc.so.6
75eb1dd03000-75eb1dd07000 r--p 001e3000 00:23 4073                       /usr/lib/libc.so.6
75eb1dd07000-75eb1dd09000 rw-p 001e7000 00:23 4073                       /usr/lib/libc.so.6
75eb1dd09000-75eb1dd11000 rw-p 00000000 00:00 0 
75eb1dd11000-75eb1dd1f000 r--p 00000000 00:23 4083                       /usr/lib/libm.so.6
75eb1dd1f000-75eb1dda2000 r-xp 0000e000 00:23 4083                       /usr/lib/libm.so.6
75eb1dda2000-75eb1ddfe000 r--p 00091000 00:23 4083                       /usr/lib/libm.so.6
75eb1ddfe000-75eb1ddff000 r--p 000ec000 00:23 4083                       /usr/lib/libm.so.6
75eb1ddff000-75eb1de00000 rw-p 000ed000 00:23 4083                       /usr/lib/libm.so.6
75eb1de00000-75eb1de97000 r--p 00000000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1de97000-75eb1dfe4000 r-xp 00097000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1dfe4000-75eb1e074000 r--p 001e4000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1e074000-75eb1e081000 r--p 00274000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1e081000-75eb1e082000 rw-p 00281000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1e082000-75eb1e086000 rw-p 00000000 00:00 0 
75eb1e0a3000-75eb1e0a7000 rw-p 00000000 00:00 0 
75eb1e0a7000-75eb1e0ab000 r--p 00000000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0ab000-75eb1e0cf000 r-xp 00004000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0cf000-75eb1e0d3000 r--p 00028000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0d3000-75eb1e0d4000 r--p 0002b000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0d4000-75eb1e0d5000 rw-p 0002c000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0d5000-75eb1e0d7000 rw-p 00000000 00:00 0 
75eb1e10a000-75eb1e10e000 r--p 00000000 00:00 0                          [vvar]
75eb1e10e000-75eb1e110000 r-xp 00000000 00:00 0                          [vdso]
75eb1e110000-75eb1e111000 r--p 00000000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e111000-75eb1e13a000 r-xp 00001000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e13a000-75eb1e144000 r--p 0002a000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e144000-75eb1e146000 r--p 00034000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e146000-75eb1e148000 rw-p 00036000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
7ffe8400a000-7ffe8402c000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0                  [vsyscall]
❯ cat /proc/119553/maps
5abbe5b9e000-5abbe5ba0000 r--p 00000000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba0000-5abbe5ba6000 r-xp 00002000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba6000-5abbe5ba8000 r--p 00008000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba8000-5abbe5ba9000 r--p 0000a000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba9000-5abbe5bb0000 rw-p 0000b000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5bb0000-5abbe5bb2000 rw-p 00000000 00:00 0 
5abbeaec9000-5abbeaf0b000 rw-p 00000000 00:00 0                          [heap]
75eb19600000-75eb1b350000 r--p 00000000 00:23 18962                      /usr/lib/libicudata.so.75.1
75eb1b350000-75eb1b351000 r--p 01d4f000 00:23 18962                      /usr/lib/libicudata.so.75.1
75eb1b393000-75eb1b394000 r--p 00000000 00:23 20916                      /usr/lib/libbrotlicommon.so.1.1.0
75eb1b394000-75eb1b395000 r-xp 00001000 00:23 20916                      /usr/lib/libbrotlicommon.so.1.1.0
75eb1b395000-75eb1b3b4000 r--p 00002000 00:23 20916                      /usr/lib/libbrotlicommon.so.1.1.0
75eb1b3b4000-75eb1b3b5000 r--p 00021000 00:23 20916                      /usr/lib/libbrotlicommon.so.1.1.0
75eb1b3b5000-75eb1b3b6000 rw-p 00022000 00:23 20916                      /usr/lib/libbrotlicommon.so.1.1.0
75eb1b3b6000-75eb1b3c0000 r--p 00000000 00:23 1136689                    /usr/lib/libgomp.so.1.0.0
75eb1b3c0000-75eb1b3fa000 r-xp 0000a000 00:23 1136689                    /usr/lib/libgomp.so.1.0.0
75eb1b3fa000-75eb1b407000 r--p 00044000 00:23 1136689                    /usr/lib/libgomp.so.1.0.0
75eb1b407000-75eb1b408000 r--p 00050000 00:23 1136689                    /usr/lib/libgomp.so.1.0.0
75eb1b408000-75eb1b409000 rw-p 00051000 00:23 1136689                    /usr/lib/libgomp.so.1.0.0
75eb1b409000-75eb1b40b000 r--p 00000000 00:23 16881                      /usr/lib/libbz2.so.1.0.8
75eb1b40b000-75eb1b418000 r-xp 00002000 00:23 16881                      /usr/lib/libbz2.so.1.0.8
75eb1b418000-75eb1b41a000 r--p 0000f000 00:23 16881                      /usr/lib/libbz2.so.1.0.8
75eb1b41a000-75eb1b41b000 r--p 00010000 00:23 16881                      /usr/lib/libbz2.so.1.0.8
75eb1b41b000-75eb1b41c000 rw-p 00011000 00:23 16881                      /usr/lib/libbz2.so.1.0.8
75eb1b41c000-75eb1b41e000 r--p 00000000 00:23 61188                      /usr/lib/libgraphite2.so.3.2.1
75eb1b41e000-75eb1b436000 r-xp 00002000 00:23 61188                      /usr/lib/libgraphite2.so.3.2.1
75eb1b436000-75eb1b43b000 r--p 0001a000 00:23 61188                      /usr/lib/libgraphite2.so.3.2.1
75eb1b43b000-75eb1b43d000 r--p 0001e000 00:23 61188                      /usr/lib/libgraphite2.so.3.2.1
75eb1b43d000-75eb1b43e000 rw-p 00020000 00:23 61188                      /usr/lib/libgraphite2.so.3.2.1
75eb1b43e000-75eb1b44c000 r--p 00000000 00:23 25385                      /usr/lib/libdbus-1.so.3.32.4
75eb1b44c000-75eb1b47a000 r-xp 0000e000 00:23 25385                      /usr/lib/libdbus-1.so.3.32.4
75eb1b47a000-75eb1b48c000 r--p 0003c000 00:23 25385                      /usr/lib/libdbus-1.so.3.32.4
75eb1b48c000-75eb1b48e000 r--p 0004e000 00:23 25385                      /usr/lib/libdbus-1.so.3.32.4
75eb1b48e000-75eb1b48f000 rw-p 00050000 00:23 25385                      /usr/lib/libdbus-1.so.3.32.4
75eb1b48f000-75eb1b491000 r--p 00000000 00:23 17206                      /usr/lib/libpcre2-8.so.0.13.0
75eb1b491000-75eb1b503000 r-xp 00002000 00:23 17206                      /usr/lib/libpcre2-8.so.0.13.0
75eb1b503000-75eb1b52c000 r--p 00074000 00:23 17206                      /usr/lib/libpcre2-8.so.0.13.0
75eb1b52c000-75eb1b52d000 r--p 0009c000 00:23 17206                      /usr/lib/libpcre2-8.so.0.13.0
75eb1b52d000-75eb1b52e000 rw-p 0009d000 00:23 17206                      /usr/lib/libpcre2-8.so.0.13.0
75eb1b52e000-75eb1b53a000 r--p 00000000 00:23 56701                      /usr/lib/libxcb.so.1.1.0
75eb1b53a000-75eb1b54e000 r-xp 0000c000 00:23 56701                      /usr/lib/libxcb.so.1.1.0
75eb1b54e000-75eb1b557000 r--p 00020000 00:23 56701                      /usr/lib/libxcb.so.1.1.0
75eb1b557000-75eb1b558000 r--p 00028000 00:23 56701                      /usr/lib/libxcb.so.1.1.0
75eb1b558000-75eb1b559000 rw-p 00029000 00:23 56701                      /usr/lib/libxcb.so.1.1.0
75eb1b559000-75eb1b55b000 r--p 00000000 00:23 2885320                    /usr/lib/libexpat.so.1.10.0
75eb1b55b000-75eb1b578000 r-xp 00002000 00:23 2885320                    /usr/lib/libexpat.so.1.10.0
75eb1b578000-75eb1b580000 r--p 0001f000 00:23 2885320                    /usr/lib/libexpat.so.1.10.0
75eb1b580000-75eb1b582000 r--p 00026000 00:23 2885320                    /usr/lib/libexpat.so.1.10.0
75eb1b582000-75eb1b583000 rw-p 00028000 00:23 2885320                    /usr/lib/libexpat.so.1.10.0
75eb1b583000-75eb1b58f000 r--p 00000000 00:23 16977                      /usr/lib/libzstd.so.1.5.6
75eb1b58f000-75eb1b64f000 r-xp 0000c000 00:23 16977                      /usr/lib/libzstd.so.1.5.6
75eb1b64f000-75eb1b660000 r--p 000cc000 00:23 16977                      /usr/lib/libzstd.so.1.5.6
75eb1b660000-75eb1b661000 r--p 000dd000 00:23 16977                      /usr/lib/libzstd.so.1.5.6
75eb1b661000-75eb1b662000 rw-p 000de000 00:23 16977                      /usr/lib/libzstd.so.1.5.6
75eb1b662000-75eb1b664000 r--p 00000000 00:23 17198                      /usr/lib/libpcre2-16.so.0.13.0
75eb1b664000-75eb1b6ca000 r-xp 00002000 00:23 17198                      /usr/lib/libpcre2-16.so.0.13.0
75eb1b6ca000-75eb1b6f2000 r--p 00068000 00:23 17198                      /usr/lib/libpcre2-16.so.0.13.0
75eb1b6f2000-75eb1b6f3000 r--p 00090000 00:23 17198                      /usr/lib/libpcre2-16.so.0.13.0
75eb1b6f3000-75eb1b6f4000 rw-p 00091000 00:23 17198                      /usr/lib/libpcre2-16.so.0.13.0
75eb1b6f4000-75eb1b6f7000 r--p 00000000 00:23 76291                      /usr/lib/libb2.so.1.0.4
75eb1b6f7000-75eb1b70e000 r-xp 00003000 00:23 76291                      /usr/lib/libb2.so.1.0.4
75eb1b70e000-75eb1b710000 r--p 0001a000 00:23 76291                      /usr/lib/libb2.so.1.0.4
75eb1b710000-75eb1b711000 r--p 0001c000 00:23 76291                      /usr/lib/libb2.so.1.0.4
75eb1b711000-75eb1b712000 rw-p 0001d000 00:23 76291                      /usr/lib/libb2.so.1.0.4
75eb1b712000-75eb1b723000 r--p 00000000 00:23 3593408                    /usr/lib/libsystemd.so.0.39.0
75eb1b723000-75eb1b7c2000 r-xp 00011000 00:23 3593408                    /usr/lib/libsystemd.so.0.39.0
75eb1b7c2000-75eb1b7f8000 r--p 000b0000 00:23 3593408                    /usr/lib/libsystemd.so.0.39.0
75eb1b7f8000-75eb1b804000 r--p 000e5000 00:23 3593408                    /usr/lib/libsystemd.so.0.39.0
75eb1b804000-75eb1b805000 rw-p 000f1000 00:23 3593408                    /usr/lib/libsystemd.so.0.39.0
75eb1b805000-75eb1b806000 rw-p 00000000 00:00 0 
75eb1b806000-75eb1b84d000 r--p 00000000 00:23 18977                      /usr/lib/libicuuc.so.75.1
75eb1b84d000-75eb1b95f000 r-xp 00047000 00:23 18977                      /usr/lib/libicuuc.so.75.1
75eb1b95f000-75eb1b9ea000 r--p 00159000 00:23 18977                      /usr/lib/libicuuc.so.75.1
75eb1b9ea000-75eb1b9fd000 r--p 001e4000 00:23 18977                      /usr/lib/libicuuc.so.75.1
75eb1b9fd000-75eb1b9fe000 rw-p 001f7000 00:23 18977                      /usr/lib/libicuuc.so.75.1
75eb1b9fe000-75eb1ba00000 rw-p 00000000 00:00 0 
75eb1ba00000-75eb1bada000 r--p 00000000 00:23 18965                      /usr/lib/libicui18n.so.75.1
75eb1bada000-75eb1bcd5000 r-xp 000da000 00:23 18965                      /usr/lib/libicui18n.so.75.1
75eb1bcd5000-75eb1bd67000 r--p 002d5000 00:23 18965                      /usr/lib/libicui18n.so.75.1
75eb1bd67000-75eb1bd7a000 r--p 00366000 00:23 18965                      /usr/lib/libicui18n.so.75.1
75eb1bd7a000-75eb1bd7b000 rw-p 00379000 00:23 18965                      /usr/lib/libicui18n.so.75.1
75eb1bd7b000-75eb1bd7c000 rw-p 00000000 00:00 0 
75eb1bd81000-75eb1bd84000 r--p 00000000 00:23 76281                      /usr/lib/libdouble-conversion.so.3.3.0
75eb1bd84000-75eb1bd91000 r-xp 00003000 00:23 76281                      /usr/lib/libdouble-conversion.so.3.3.0
75eb1bd91000-75eb1bd96000 r--p 00010000 00:23 76281                      /usr/lib/libdouble-conversion.so.3.3.0
75eb1bd96000-75eb1bd97000 r--p 00014000 00:23 76281                      /usr/lib/libdouble-conversion.so.3.3.0
75eb1bd97000-75eb1bd98000 rw-p 00015000 00:23 76281                      /usr/lib/libdouble-conversion.so.3.3.0
75eb1bd98000-75eb1bdd9000 r--p 00000000 00:23 64289                      /usr/lib/libGLdispatch.so.0.0.0
75eb1bdd9000-75eb1be18000 r-xp 00041000 00:23 64289                      /usr/lib/libGLdispatch.so.0.0.0
75eb1be18000-75eb1be2b000 r--p 00080000 00:23 64289                      /usr/lib/libGLdispatch.so.0.0.0
75eb1be2b000-75eb1be47000 r--p 00093000 00:23 64289                      /usr/lib/libGLdispatch.so.0.0.0
75eb1be47000-75eb1be48000 rw-p 000af000 00:23 64289                      /usr/lib/libGLdispatch.so.0.0.0
75eb1be48000-75eb1be50000 rw-p 00000000 00:00 0 
75eb1be50000-75eb1be5c000 r--p 00000000 00:23 2885386                    /usr/lib/libharfbuzz.so.0.61010.0
75eb1be5c000-75eb1bf39000 r-xp 0000c000 00:23 2885386                    /usr/lib/libharfbuzz.so.0.61010.0
75eb1bf39000-75eb1bf6c000 r--p 000e9000 00:23 2885386                    /usr/lib/libharfbuzz.so.0.61010.0
75eb1bf6c000-75eb1bf6e000 r--p 0011b000 00:23 2885386                    /usr/lib/libharfbuzz.so.0.61010.0
75eb1bf6e000-75eb1bf6f000 rw-p 0011d000 00:23 2885386                    /usr/lib/libharfbuzz.so.0.61010.0
75eb1bf6f000-75eb1bf8d000 r--p 00000000 00:23 3689698                    /usr/lib/libglib-2.0.so.0.8200.3
75eb1bf8d000-75eb1c033000 r-xp 0001e000 00:23 3689698                    /usr/lib/libglib-2.0.so.0.8200.3
75eb1c033000-75eb1c0bc000 r--p 000c4000 00:23 3689698                    /usr/lib/libglib-2.0.so.0.8200.3
75eb1c0bc000-75eb1c0bd000 r--p 0014d000 00:23 3689698                    /usr/lib/libglib-2.0.so.0.8200.3
75eb1c0bd000-75eb1c0be000 rw-p 0014e000 00:23 3689698                    /usr/lib/libglib-2.0.so.0.8200.3
75eb1c0be000-75eb1c0bf000 rw-p 00000000 00:00 0 
75eb1c0bf000-75eb1c0d6000 r--p 00000000 00:23 59066                      /usr/lib/libX11.so.6.4.0
75eb1c0d6000-75eb1c16a000 r-xp 00017000 00:23 59066                      /usr/lib/libX11.so.6.4.0
75eb1c16a000-75eb1c1f9000 r--p 000ab000 00:23 59066                      /usr/lib/libX11.so.6.4.0
75eb1c1f9000-75eb1c1fc000 r--p 00139000 00:23 59066                      /usr/lib/libX11.so.6.4.0
75eb1c1fc000-75eb1c200000 rw-p 0013c000 00:23 59066                      /usr/lib/libX11.so.6.4.0
75eb1c200000-75eb1c28e000 r--p 00000000 00:23 3609027                    /usr/lib/libQt6Core.so.6.8.1
75eb1c28e000-75eb1c644000 r-xp 0008e000 00:23 3609027                    /usr/lib/libQt6Core.so.6.8.1
75eb1c644000-75eb1c7de000 r--p 00444000 00:23 3609027                    /usr/lib/libQt6Core.so.6.8.1
75eb1c7de000-75eb1c7ee000 r--p 005de000 00:23 3609027                    /usr/lib/libQt6Core.so.6.8.1
75eb1c7ee000-75eb1c7f6000 rw-p 005ee000 00:23 3609027                    /usr/lib/libQt6Core.so.6.8.1
75eb1c7f6000-75eb1c7fb000 rw-p 00000000 00:00 0 
75eb1c800000-75eb1c8dd000 r--p 00000000 00:23 3609055                    /usr/lib/libQt6Gui.so.6.8.1
75eb1c8dd000-75eb1cf68000 r-xp 000dd000 00:23 3609055                    /usr/lib/libQt6Gui.so.6.8.1
75eb1cf68000-75eb1d09c000 r--p 00768000 00:23 3609055                    /usr/lib/libQt6Gui.so.6.8.1
75eb1d09c000-75eb1d0b6000 r--p 0089b000 00:23 3609055                    /usr/lib/libQt6Gui.so.6.8.1
75eb1d0b6000-75eb1d0c3000 rw-p 008b5000 00:23 3609055                    /usr/lib/libQt6Gui.so.6.8.1
75eb1d0c3000-75eb1d0d2000 rw-p 00000000 00:00 0 
75eb1d0d3000-75eb1d0d4000 r--p 00000000 00:23 20919                      /usr/lib/libbrotlidec.so.1.1.0
75eb1d0d4000-75eb1d0dd000 r-xp 00001000 00:23 20919                      /usr/lib/libbrotlidec.so.1.1.0
75eb1d0dd000-75eb1d0e0000 r--p 0000a000 00:23 20919                      /usr/lib/libbrotlidec.so.1.1.0
75eb1d0e0000-75eb1d0e1000 r--p 0000c000 00:23 20919                      /usr/lib/libbrotlidec.so.1.1.0
75eb1d0e1000-75eb1d0e2000 rw-p 0000d000 00:23 20919                      /usr/lib/libbrotlidec.so.1.1.0
75eb1d0e2000-75eb1d0e5000 r--p 00000000 00:23 8191                       /usr/lib/libz.so.1.3.1
75eb1d0e5000-75eb1d0f3000 r-xp 00003000 00:23 8191                       /usr/lib/libz.so.1.3.1
75eb1d0f3000-75eb1d0f9000 r--p 00011000 00:23 8191                       /usr/lib/libz.so.1.3.1
75eb1d0f9000-75eb1d0fa000 r--p 00017000 00:23 8191                       /usr/lib/libz.so.1.3.1
75eb1d0fa000-75eb1d0fb000 rw-p 00018000 00:23 8191                       /usr/lib/libz.so.1.3.1
75eb1d0fb000-75eb1d101000 r--p 00000000 00:23 501110                     /usr/lib/libfreetype.so.6.20.2
75eb1d101000-75eb1d195000 r-xp 00006000 00:23 501110                     /usr/lib/libfreetype.so.6.20.2
75eb1d195000-75eb1d1bc000 r--p 0009a000 00:23 501110                     /usr/lib/libfreetype.so.6.20.2
75eb1d1bc000-75eb1d1c4000 r--p 000c0000 00:23 501110                     /usr/lib/libfreetype.so.6.20.2
75eb1d1c4000-75eb1d1c5000 rw-p 000c8000 00:23 501110                     /usr/lib/libfreetype.so.6.20.2
75eb1d1c5000-75eb1d1cb000 r--p 00000000 00:23 1586349                    /usr/lib/libpng16.so.16.44.0
75eb1d1cb000-75eb1d1f5000 r-xp 00006000 00:23 1586349                    /usr/lib/libpng16.so.16.44.0
75eb1d1f5000-75eb1d1fe000 r--p 00030000 00:23 1586349                    /usr/lib/libpng16.so.16.44.0
75eb1d1fe000-75eb1d1ff000 r--p 00039000 00:23 1586349                    /usr/lib/libpng16.so.16.44.0
75eb1d1ff000-75eb1d200000 rw-p 0003a000 00:23 1586349                    /usr/lib/libpng16.so.16.44.0
75eb1d200000-75eb1d2e9000 r--p 00000000 00:23 3609087                    /usr/lib/libQt6Widgets.so.6.8.1
75eb1d2e9000-75eb1d7a9000 r-xp 000e9000 00:23 3609087                    /usr/lib/libQt6Widgets.so.6.8.1
75eb1d7a9000-75eb1d8eb000 r--p 005a9000 00:23 3609087                    /usr/lib/libQt6Widgets.so.6.8.1
75eb1d8eb000-75eb1d923000 r--p 006ea000 00:23 3609087                    /usr/lib/libQt6Widgets.so.6.8.1
75eb1d923000-75eb1d930000 rw-p 00722000 00:23 3609087                    /usr/lib/libQt6Widgets.so.6.8.1
75eb1d930000-75eb1d931000 rw-p 00000000 00:00 0 
75eb1d935000-75eb1d937000 r--p 00000000 00:23 56563                      /usr/lib/libXdmcp.so.6.0.0
75eb1d937000-75eb1d939000 r-xp 00002000 00:23 56563                      /usr/lib/libXdmcp.so.6.0.0
75eb1d939000-75eb1d93b000 r--p 00004000 00:23 56563                      /usr/lib/libXdmcp.so.6.0.0
75eb1d93b000-75eb1d93c000 r--p 00005000 00:23 56563                      /usr/lib/libXdmcp.so.6.0.0
75eb1d93c000-75eb1d93d000 rw-p 00006000 00:23 56563                      /usr/lib/libXdmcp.so.6.0.0
75eb1d93d000-75eb1d940000 r--p 00000000 00:23 60869                      /usr/lib/libxkbcommon.so.0.0.0
75eb1d940000-75eb1d95f000 r-xp 00003000 00:23 60869                      /usr/lib/libxkbcommon.so.0.0.0
75eb1d95f000-75eb1d982000 r--p 00022000 00:23 60869                      /usr/lib/libxkbcommon.so.0.0.0
75eb1d982000-75eb1d984000 r--p 00044000 00:23 60869                      /usr/lib/libxkbcommon.so.0.0.0
75eb1d984000-75eb1d985000 rw-p 00046000 00:23 60869                      /usr/lib/libxkbcommon.so.0.0.0
75eb1d985000-75eb1d9a1000 r--p 00000000 00:23 3609031                    /usr/lib/libQt6DBus.so.6.8.1
75eb1d9a1000-75eb1da20000 r-xp 0001c000 00:23 3609031                    /usr/lib/libQt6DBus.so.6.8.1
75eb1da20000-75eb1da39000 r--p 0009b000 00:23 3609031                    /usr/lib/libQt6DBus.so.6.8.1
75eb1da39000-75eb1da3d000 r--p 000b3000 00:23 3609031                    /usr/lib/libQt6DBus.so.6.8.1
75eb1da3d000-75eb1da3f000 rw-p 000b7000 00:23 3609031                    /usr/lib/libQt6DBus.so.6.8.1
75eb1da3f000-75eb1da40000 rw-p 00000000 00:00 0 
75eb1da40000-75eb1da48000 r--p 00000000 00:23 61353                      /usr/lib/libfontconfig.so.1.14.0
75eb1da48000-75eb1da75000 r-xp 00008000 00:23 61353                      /usr/lib/libfontconfig.so.1.14.0
75eb1da75000-75eb1da8d000 r--p 00035000 00:23 61353                      /usr/lib/libfontconfig.so.1.14.0
75eb1da8d000-75eb1da8f000 r--p 0004c000 00:23 61353                      /usr/lib/libfontconfig.so.1.14.0
75eb1da8f000-75eb1da90000 rw-p 0004e000 00:23 61353                      /usr/lib/libfontconfig.so.1.14.0
75eb1da90000-75eb1daa5000 r--p 00000000 00:23 64292                      /usr/lib/libOpenGL.so.0.0.0
75eb1daa5000-75eb1dab0000 r-xp 00015000 00:23 64292                      /usr/lib/libOpenGL.so.0.0.0
75eb1dab0000-75eb1dab5000 r--p 00020000 00:23 64292                      /usr/lib/libOpenGL.so.0.0.0
75eb1dab5000-75eb1daba000 r--p 00025000 00:23 64292                      /usr/lib/libOpenGL.so.0.0.0
75eb1daba000-75eb1dabb000 rw-p 0002a000 00:23 64292                      /usr/lib/libOpenGL.so.0.0.0
75eb1dabb000-75eb1dabe000 r--p 00000000 00:23 64286                      /usr/lib/libGLX.so.0.0.0
75eb1dabe000-75eb1dad8000 r-xp 00003000 00:23 64286                      /usr/lib/libGLX.so.0.0.0
75eb1dad8000-75eb1dadb000 r--p 0001d000 00:23 64286                      /usr/lib/libGLX.so.0.0.0
75eb1dadb000-75eb1dadc000 r--p 00020000 00:23 64286                      /usr/lib/libGLX.so.0.0.0
75eb1dadc000-75eb1dadd000 rw-p 00021000 00:23 64286                      /usr/lib/libGLX.so.0.0.0
75eb1dadd000-75eb1daed000 rw-p 00000000 00:00 0 
75eb1db20000-75eb1db44000 r--p 00000000 00:23 4073                       /usr/lib/libc.so.6
75eb1db44000-75eb1dcb5000 r-xp 00024000 00:23 4073                       /usr/lib/libc.so.6
75eb1dcb5000-75eb1dd03000 r--p 00195000 00:23 4073                       /usr/lib/libc.so.6
75eb1dd03000-75eb1dd07000 r--p 001e3000 00:23 4073                       /usr/lib/libc.so.6
75eb1dd07000-75eb1dd09000 rw-p 001e7000 00:23 4073                       /usr/lib/libc.so.6
75eb1dd09000-75eb1dd11000 rw-p 00000000 00:00 0 
75eb1dd11000-75eb1dd1f000 r--p 00000000 00:23 4083                       /usr/lib/libm.so.6
75eb1dd1f000-75eb1dda2000 r-xp 0000e000 00:23 4083                       /usr/lib/libm.so.6
75eb1dda2000-75eb1ddfe000 r--p 00091000 00:23 4083                       /usr/lib/libm.so.6
75eb1ddfe000-75eb1ddff000 r--p 000ec000 00:23 4083                       /usr/lib/libm.so.6
75eb1ddff000-75eb1de00000 rw-p 000ed000 00:23 4083                       /usr/lib/libm.so.6
75eb1de00000-75eb1de97000 r--p 00000000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1de97000-75eb1dfe4000 r-xp 00097000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1dfe4000-75eb1e074000 r--p 001e4000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1e074000-75eb1e081000 r--p 00274000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1e081000-75eb1e082000 rw-p 00281000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1e082000-75eb1e086000 rw-p 00000000 00:00 0 
75eb1e088000-75eb1e089000 r--p 00000000 00:23 56576                      /usr/lib/libXau.so.6.0.0
75eb1e089000-75eb1e08a000 r-xp 00001000 00:23 56576                      /usr/lib/libXau.so.6.0.0
75eb1e08a000-75eb1e08b000 r--p 00002000 00:23 56576                      /usr/lib/libXau.so.6.0.0
75eb1e08b000-75eb1e08c000 r--p 00002000 00:23 56576                      /usr/lib/libXau.so.6.0.0
75eb1e08c000-75eb1e08d000 rw-p 00003000 00:23 56576                      /usr/lib/libXau.so.6.0.0
75eb1e08d000-75eb1e08f000 r--p 00000000 00:23 77230                      /usr/lib/libmd4c.so.0.5.2
75eb1e08f000-75eb1e09e000 r-xp 00002000 00:23 77230                      /usr/lib/libmd4c.so.0.5.2
75eb1e09e000-75eb1e0a1000 r--p 00011000 00:23 77230                      /usr/lib/libmd4c.so.0.5.2
75eb1e0a1000-75eb1e0a2000 r--p 00014000 00:23 77230                      /usr/lib/libmd4c.so.0.5.2
75eb1e0a2000-75eb1e0a3000 rw-p 00015000 00:23 77230                      /usr/lib/libmd4c.so.0.5.2
75eb1e0a3000-75eb1e0a7000 rw-p 00000000 00:00 0 
75eb1e0a7000-75eb1e0ab000 r--p 00000000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0ab000-75eb1e0cf000 r-xp 00004000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0cf000-75eb1e0d3000 r--p 00028000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0d3000-75eb1e0d4000 r--p 0002b000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0d4000-75eb1e0d5000 rw-p 0002c000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0d5000-75eb1e0d7000 rw-p 00000000 00:00 0 
75eb1e0d8000-75eb1e0db000 r--p 00000000 00:23 2778032                    /usr/lib/libcap.so.2.71
75eb1e0db000-75eb1e0e0000 r-xp 00003000 00:23 2778032                    /usr/lib/libcap.so.2.71
75eb1e0e0000-75eb1e0e2000 r--p 00008000 00:23 2778032                    /usr/lib/libcap.so.2.71
75eb1e0e2000-75eb1e0e3000 r--p 00009000 00:23 2778032                    /usr/lib/libcap.so.2.71
75eb1e0e3000-75eb1e0e4000 rw-p 0000a000 00:23 2778032                    /usr/lib/libcap.so.2.71
75eb1e0e4000-75eb1e0e7000 r--p 00000000 00:23 64277                      /usr/lib/libEGL.so.1.1.0
75eb1e0e7000-75eb1e0f0000 r-xp 00003000 00:23 64277                      /usr/lib/libEGL.so.1.1.0
75eb1e0f0000-75eb1e0f4000 r--p 0000c000 00:23 64277                      /usr/lib/libEGL.so.1.1.0
75eb1e0f4000-75eb1e0f5000 r--p 0000f000 00:23 64277                      /usr/lib/libEGL.so.1.1.0
75eb1e0f5000-75eb1e0f6000 rw-p 00010000 00:23 64277                      /usr/lib/libEGL.so.1.1.0
75eb1e0f6000-75eb1e0f8000 r--p 00000000 00:23 10425420                   /home/alex/dlopen-test/build/libplugin.so
75eb1e0f8000-75eb1e0fe000 r-xp 00002000 00:23 10425420                   /home/alex/dlopen-test/build/libplugin.so
75eb1e0fe000-75eb1e100000 r--p 00008000 00:23 10425420                   /home/alex/dlopen-test/build/libplugin.so
75eb1e100000-75eb1e101000 r--p 0000a000 00:23 10425420                   /home/alex/dlopen-test/build/libplugin.so
75eb1e101000-75eb1e108000 rw-p 0000b000 00:23 10425420                   /home/alex/dlopen-test/build/libplugin.so
75eb1e108000-75eb1e10a000 rw-p 00000000 00:00 0 
75eb1e10a000-75eb1e10e000 r--p 00000000 00:00 0                          [vvar]
75eb1e10e000-75eb1e110000 r-xp 00000000 00:00 0                          [vdso]
75eb1e110000-75eb1e111000 r--p 00000000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e111000-75eb1e13a000 r-xp 00001000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e13a000-75eb1e144000 r--p 0002a000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e144000-75eb1e146000 r--p 00034000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e146000-75eb1e148000 rw-p 00036000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
7ffe8400a000-7ffe8402c000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0                  [vsyscall]
❯ cat /proc/119553/maps
5abbe5b9e000-5abbe5ba0000 r--p 00000000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba0000-5abbe5ba6000 r-xp 00002000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba6000-5abbe5ba8000 r--p 00008000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba8000-5abbe5ba9000 r--p 0000a000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5ba9000-5abbe5bb0000 rw-p 0000b000 00:23 10441556                   /home/alex/dlopen-test/build/dlopen_test
5abbe5bb0000-5abbe5bb2000 rw-p 00000000 00:00 0 
5abbeaec9000-5abbeaf0b000 rw-p 00000000 00:00 0                          [heap]
75eb1b48f000-75eb1b491000 r--p 00000000 00:23 17206                      /usr/lib/libpcre2-8.so.0.13.0
75eb1b491000-75eb1b503000 r-xp 00002000 00:23 17206                      /usr/lib/libpcre2-8.so.0.13.0
75eb1b503000-75eb1b52c000 r--p 00074000 00:23 17206                      /usr/lib/libpcre2-8.so.0.13.0
75eb1b52c000-75eb1b52d000 r--p 0009c000 00:23 17206                      /usr/lib/libpcre2-8.so.0.13.0
75eb1b52d000-75eb1b52e000 rw-p 0009d000 00:23 17206                      /usr/lib/libpcre2-8.so.0.13.0
75eb1b712000-75eb1b723000 r--p 00000000 00:23 3593408                    /usr/lib/libsystemd.so.0.39.0
75eb1b723000-75eb1b7c2000 r-xp 00011000 00:23 3593408                    /usr/lib/libsystemd.so.0.39.0
75eb1b7c2000-75eb1b7f8000 r--p 000b0000 00:23 3593408                    /usr/lib/libsystemd.so.0.39.0
75eb1b7f8000-75eb1b804000 r--p 000e5000 00:23 3593408                    /usr/lib/libsystemd.so.0.39.0
75eb1b804000-75eb1b805000 rw-p 000f1000 00:23 3593408                    /usr/lib/libsystemd.so.0.39.0
75eb1b805000-75eb1b806000 rw-p 00000000 00:00 0 
75eb1bf6f000-75eb1bf8d000 r--p 00000000 00:23 3689698                    /usr/lib/libglib-2.0.so.0.8200.3
75eb1bf8d000-75eb1c033000 r-xp 0001e000 00:23 3689698                    /usr/lib/libglib-2.0.so.0.8200.3
75eb1c033000-75eb1c0bc000 r--p 000c4000 00:23 3689698                    /usr/lib/libglib-2.0.so.0.8200.3
75eb1c0bc000-75eb1c0bd000 r--p 0014d000 00:23 3689698                    /usr/lib/libglib-2.0.so.0.8200.3
75eb1c0bd000-75eb1c0be000 rw-p 0014e000 00:23 3689698                    /usr/lib/libglib-2.0.so.0.8200.3
75eb1c0be000-75eb1c0bf000 rw-p 00000000 00:00 0 
75eb1db20000-75eb1db44000 r--p 00000000 00:23 4073                       /usr/lib/libc.so.6
75eb1db44000-75eb1dcb5000 r-xp 00024000 00:23 4073                       /usr/lib/libc.so.6
75eb1dcb5000-75eb1dd03000 r--p 00195000 00:23 4073                       /usr/lib/libc.so.6
75eb1dd03000-75eb1dd07000 r--p 001e3000 00:23 4073                       /usr/lib/libc.so.6
75eb1dd07000-75eb1dd09000 rw-p 001e7000 00:23 4073                       /usr/lib/libc.so.6
75eb1dd09000-75eb1dd11000 rw-p 00000000 00:00 0 
75eb1dd11000-75eb1dd1f000 r--p 00000000 00:23 4083                       /usr/lib/libm.so.6
75eb1dd1f000-75eb1dda2000 r-xp 0000e000 00:23 4083                       /usr/lib/libm.so.6
75eb1dda2000-75eb1ddfe000 r--p 00091000 00:23 4083                       /usr/lib/libm.so.6
75eb1ddfe000-75eb1ddff000 r--p 000ec000 00:23 4083                       /usr/lib/libm.so.6
75eb1ddff000-75eb1de00000 rw-p 000ed000 00:23 4083                       /usr/lib/libm.so.6
75eb1de00000-75eb1de97000 r--p 00000000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1de97000-75eb1dfe4000 r-xp 00097000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1dfe4000-75eb1e074000 r--p 001e4000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1e074000-75eb1e081000 r--p 00274000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1e081000-75eb1e082000 rw-p 00281000 00:23 1136707                    /usr/lib/libstdc++.so.6.0.33
75eb1e082000-75eb1e086000 rw-p 00000000 00:00 0 
75eb1e0a3000-75eb1e0a7000 rw-p 00000000 00:00 0 
75eb1e0a7000-75eb1e0ab000 r--p 00000000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0ab000-75eb1e0cf000 r-xp 00004000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0cf000-75eb1e0d3000 r--p 00028000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0d3000-75eb1e0d4000 r--p 0002b000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0d4000-75eb1e0d5000 rw-p 0002c000 00:23 1136677                    /usr/lib/libgcc_s.so.1
75eb1e0d5000-75eb1e0d7000 rw-p 00000000 00:00 0 
75eb1e0d8000-75eb1e0db000 r--p 00000000 00:23 2778032                    /usr/lib/libcap.so.2.71
75eb1e0db000-75eb1e0e0000 r-xp 00003000 00:23 2778032                    /usr/lib/libcap.so.2.71
75eb1e0e0000-75eb1e0e2000 r--p 00008000 00:23 2778032                    /usr/lib/libcap.so.2.71
75eb1e0e2000-75eb1e0e3000 r--p 00009000 00:23 2778032                    /usr/lib/libcap.so.2.71
75eb1e0e3000-75eb1e0e4000 rw-p 0000a000 00:23 2778032                    /usr/lib/libcap.so.2.71
75eb1e10a000-75eb1e10e000 r--p 00000000 00:00 0                          [vvar]
75eb1e10e000-75eb1e110000 r-xp 00000000 00:00 0                          [vdso]
75eb1e110000-75eb1e111000 r--p 00000000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e111000-75eb1e13a000 r-xp 00001000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e13a000-75eb1e144000 r--p 0002a000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e144000-75eb1e146000 r--p 00034000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
75eb1e146000-75eb1e148000 rw-p 00036000 00:23 4064                       /usr/lib/ld-linux-x86-64.so.2
7ffe8400a000-7ffe8402c000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0                  [vsyscall]
Comment 4 Paul Floyd 2024-12-12 10:51:13 UTC
Where is the leak? How much memory?
Comment 5 leshe4ka 2024-12-12 11:11:01 UTC
(In reply to Paul Floyd from comment #4)
> Where is the leak? How much memory?

Added screen to repo
https://github.com/leshe4ka46/dlopen-leaks/blob/main/leak.jpg
Comment 6 Paul Floyd 2024-12-13 19:02:14 UTC
No problem on FreeBSD

paulf> /home/paulf/tools/valgrind/bin/valgrind -s ./dlopen_test
==2341== Memcheck, a memory error detector
==2341== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==2341== Using Valgrind-3.25.0.GIT and LibVEX; rerun with -h for copyright info
==2341== Command: ./dlopen_test
==2341== 



==2341== 
==2341== HEAP SUMMARY:
==2341==     in use at exit: 4,096 bytes in 1 blocks
==2341==   total heap usage: 1 allocs, 0 frees, 4,096 bytes allocated
==2341== 
==2341== LEAK SUMMARY:
==2341==    definitely lost: 0 bytes in 0 blocks
==2341==    indirectly lost: 0 bytes in 0 blocks
==2341==      possibly lost: 0 bytes in 0 blocks
==2341==    still reachable: 0 bytes in 0 blocks
==2341==         suppressed: 4,096 bytes in 1 blocks
==2341== 
==2341== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
--2341-- 
--2341-- used_suppression:      1 MEMCHECK-LIBC-GETC /usr/home/paulf/tools/valgrind/libexec/valgrind/default.supp:672 suppressed: 4,096 bytes in 1 blocks
==2341== 
==2341== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

I'll try again on Linux in a moment.
Comment 7 leshe4ka 2024-12-13 19:34:28 UTC
What version of glibc do you use on FreeBSD?
Comment 8 Paul Floyd 2024-12-13 20:29:04 UTC
(In reply to leshe4ka from comment #7)
> What version of glibc do you use on FreeBSD?

None. FreeBSD has its own libc which alsmost all apps use.
Comment 9 Paul Floyd 2024-12-13 21:17:15 UTC
On Fedora 41 I get a crash

Program received signal SIGSEGV, Segmentation fault.
_dl_close (_map=0x0) at dl-close.c:770
770       if (__glibc_unlikely (map->l_nodelete_active))

map is NULL.
Comment 10 leshe4ka 2024-12-13 21:56:44 UTC
From where you start dlopen_test?
By default it searches for plugin in ./build/libplugin.so

You mau need to run ./build/dlopen_test
Comment 11 Paul Floyd 2024-12-14 06:35:18 UTC
I was building and running in './build'

On FreeBSD I now get a load of reachables from glib - to be expected as glib seems to be basket case quality when it comes to bothering to free memory. I just pushed an extra suppression for a reachable from __cxa_exit. I'll try Linux again later this weekend.
Comment 12 Mark Wielaard 2024-12-14 19:03:38 UTC
(In reply to Paul Floyd from comment #11)
> On FreeBSD I now get a load of reachables from glib - to be expected as glib
> seems to be basket case quality when it comes to bothering to free memory.

Note that glib does provide its won suppression file:
https://gitlab.gnome.org/GNOME/glib/-/blob/main/tools/glib.supp

# GLib Valgrind suppressions file
#
# This provides a list of suppressions for all of GLib (including GIO), for all
# Valgrind tools (memcheck, drd, helgrind, etc.) for the false positives and
# deliberate one-time leaks which GLib causes to be reported when running under
# Valgrind.
Comment 13 Paul Floyd 2024-12-14 20:43:36 UTC
The glib suppression file (with 148 suppressions!!! - our default.supp has only 178) makes no difference.

On Fedora 41 I get

==106516== HEAP SUMMARY:
==106516==     in use at exit: 98,431 bytes in 201 blocks
==106516==   total heap usage: 384 allocs, 183 frees, 266,473 bytes allocated

... 16 contexts ...

==129114== LEAK SUMMARY:
==129114==    definitely lost: 0 bytes in 0 blocks
==129114==    indirectly lost: 0 bytes in 0 blocks
==129114==      possibly lost: 0 bytes in 0 blocks
==129114==    still reachable: 98,431 bytes in 201 blocks
==129114==         suppressed: 0 bytes in 0 blocks

Some of the reachables are in glib (7) and some in ld.so (9).

I'll have another go later to see what I get on Arch.
Comment 14 Paul Floyd 2024-12-24 08:44:46 UTC
On Arch I get

==16682== HEAP SUMMARY:
==16682==     in use at exit: 24,879 bytes in 29 blocks
==16682==   total heap usage: 335 allocs, 306 frees, 233,296 bytes allocated
==16682== 
==16682== 8 bytes in 1 blocks are definitely lost in loss record 1 of 15
==16682==    at 0x48447C2: malloc (vg_replace_malloc.c:446)
==16682==    by 0x96A0A35: ???
==16682==    by 0x96B788F: ???
==16682==    by 0x969F1BB: ???
==16682==    by 0x40045B6: call_init (dl-init.c:74)
==16682==    by 0x40045B6: call_init (dl-init.c:26)
==16682==    by 0x40046AC: _dl_init (dl-init.c:121)
==16682==    by 0x40015C1: _dl_catch_exception (dl-catch.c:215)
==16682==    by 0x400B4FB: dl_open_worker (dl-open.c:829)
==16682==    by 0x4001522: _dl_catch_exception (dl-catch.c:241)
==16682==    by 0x400B903: _dl_open (dl-open.c:905)
==16682==    by 0x4CA3F13: dlopen_doit (dlopen.c:56)
==16682==    by 0x4001522: _dl_catch_exception (dl-catch.c:241)
==16682== 
==16682== 96 bytes in 1 blocks are definitely lost in loss record 10 of 15
==16682==    at 0x484BEFF: calloc (vg_replace_malloc.c:1675)
==16682==    by 0x96A0A6D: ???
==16682==    by 0x969F100: ???
==16682==    by 0x969F1D7: ???
==16682==    by 0x40045B6: call_init (dl-init.c:74)
==16682==    by 0x40045B6: call_init (dl-init.c:26)
==16682==    by 0x40046AC: _dl_init (dl-init.c:121)
==16682==    by 0x40015C1: _dl_catch_exception (dl-catch.c:215)
==16682==    by 0x400B4FB: dl_open_worker (dl-open.c:829)
==16682==    by 0x4001522: _dl_catch_exception (dl-catch.c:241)
==16682==    by 0x400B903: _dl_open (dl-open.c:905)
==16682==    by 0x4CA3F13: dlopen_doit (dlopen.c:56)
==16682==    by 0x4001522: _dl_catch_exception (dl-catch.c:241)
==16682== 
==16682== LEAK SUMMARY:
==16682==    definitely lost: 104 bytes in 2 blocks
==16682==    indirectly lost: 0 bytes in 0 blocks
==16682==      possibly lost: 0 bytes in 0 blocks
==16682==    still reachable: 24,775 bytes in 27 blocks
==16682==         suppressed: 0 bytes in 0 blocks
==16682== Reachable blocks (those to which a pointer was found) are not shown.
==16682== To see them, rerun with: --leak-check=full --show-leak-kinds=all

I'll open a glibc item for that.
Comment 16 Paul Floyd 2024-12-26 09:26:53 UTC
I'm closing this as it's not a Valgrind problem.

Please either take it up with Arch to see why they don't have STB_GNU_UNIQUE with their libQt6Core.so.6 or open a request with GCC as described at the end of the linked glibc bugzilla item.

If neither is willing to make a change I'll consider adding default suppresions.