https://bugs.openldap.org/show_bug.cgi?id=9432
Issue ID: 9432 Summary: ldap_initialize leaks memory if compiled with cyrus sasl Product: OpenLDAP Version: 2.4.56 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: libraries Assignee: bugs@openldap.org Reporter: sternenseemann@systemli.org Target Milestone: ---
Created attachment 782 --> https://bugs.openldap.org/attachment.cgi?id=782&action=edit Code for the first two examples, compiled with -lldap -lsasl2
I have a trivial program which just connects to a LDAP server optionally using TLS and does nothing further. If I use libldap compiled with SASL support, the executable leaks memory from ldap_initialize even though I call sasl_client_done() in the end:
------------------------------------------------- valgrind --show-leak-kinds=all --leak-check=full -s ./ldapsimilarity ldaps://db.debian.org ==20383== Memcheck, a memory error detector ==20383== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==20383== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info ==20383== Command: ./ldapsimilarity ldaps://db.debian.org ==20383== Using db.debian.org:636 ==20383== ==20383== HEAP SUMMARY: ==20383== in use at exit: 212 bytes in 3 blocks ==20383== total heap usage: 766 allocs, 763 frees, 169,881 bytes allocated ==20383== ==20383== 20 bytes in 2 blocks are indirectly lost in loss record 1 of 2 ==20383== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20383== by 0x56255BE: ??? ==20383== by 0x5626FC3: ??? ==20383== by 0x56272AE: ??? ==20383== by 0x56280A2: ??? ==20383== by 0x56280B7: ??? ==20383== by 0x489D20E: sasl_client_add_plugin (client.c:194) ==20383== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20383== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20383== by 0x489DD43: sasl_client_init (client.c:316) ==20383== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20383== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20383== ==20383== 212 (192 direct, 20 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 2 ==20383== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20383== by 0x56271C9: ??? ==20383== by 0x56280A2: ??? ==20383== by 0x56280B7: ??? ==20383== by 0x489D20E: sasl_client_add_plugin (client.c:194) ==20383== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20383== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20383== by 0x489DD43: sasl_client_init (client.c:316) ==20383== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20383== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20383== by 0x485620D: ldap_create (open.c:109) ==20383== by 0x4856491: ldap_initialize (open.c:241) ==20383== ==20383== LEAK SUMMARY: ==20383== definitely lost: 192 bytes in 1 blocks ==20383== indirectly lost: 20 bytes in 2 blocks ==20383== possibly lost: 0 bytes in 0 blocks ==20383== still reachable: 0 bytes in 0 blocks ==20383== suppressed: 0 bytes in 0 blocks ==20383== ==20383== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) -------------------------------------------------
If I compile openldap without cyrus sasl the valgrind log looks like this:
------------------------------------------------- valgrind --show-leak-kinds=all --leak-check=full -s ./ldapsimilarity ldaps://db.debian.org ==20305== Memcheck, a memory error detector ==20305== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==20305== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info ==20305== Command: ./ldapsimilarity ldaps://db.debian.org ==20305== Using db.debian.org:636 ==20305== ==20305== HEAP SUMMARY: ==20305== in use at exit: 0 bytes in 0 blocks ==20305== total heap usage: 45 allocs, 45 frees, 13,788 bytes allocated ==20305== ==20305== All heap blocks were freed -- no leaks are possible ==20305== ==20305== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) -------------------------------------------------
Also note that if I don't call sasl_client_done() and link specifically againt cyrus sasl for that purpose, as I never call any sasl related functions, the executable leaks over 20K. It seems like an oversight to me that ldap_unbind_ext doesn't free anything SASL related.
------------------------------------------------- valgrind --show-leak-kinds=all --leak-check=full -s ./ldapsimilarity ldaps://db.debian.org ==20410== Memcheck, a memory error detector ==20410== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==20410== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info ==20410== Command: ./ldapsimilarity ldaps://db.debian.org ==20410== Using db.debian.org:636 ==20410== ==20410== HEAP SUMMARY: ==20410== in use at exit: 26,473 bytes in 103 blocks ==20410== total heap usage: 753 allocs, 650 frees, 154,770 bytes allocated ==20410== ==20410== 6 bytes in 1 blocks are still reachable in loss record 1 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x4E38FD6: generic_gss_add_oid_set_member (in /nix/store/yrh78gd3swn5a0z5lal4kra42a1ybl48-libkrb5-1.18/lib/libgssapi_krb5.so.2.2) ==20410== by 0x4E47DFE: gss_add_oid_set_member (in /nix/store/yrh78gd3swn5a0z5lal4kra42a1ybl48-libkrb5-1.18/lib/libgssapi_krb5.so.2.2) ==20410== by 0x4E4746C: gss_indicate_mechs_by_attrs (in /nix/store/yrh78gd3swn5a0z5lal4kra42a1ybl48-libkrb5-1.18/lib/libgssapi_krb5.so.2.2) ==20410== by 0x5627112: gs2_indicate_mechs (gs2.c:1365) ==20410== by 0x56271AC: gs2_common_plug_init (gs2.c:573) ==20410== by 0x56280A2: gs2_client_plug_init (gs2.c:961) ==20410== by 0x56280B7: sasl_client_plug_init (gs2_init.c:41) ==20410== by 0x489D20E: sasl_client_add_plugin (client.c:194) ==20410== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20410== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== ==20410== 9 bytes in 1 blocks are still reachable in loss record 2 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x489FCBB: _sasl_strdup (common.c:179) ==20410== by 0x489D2F1: sasl_client_add_plugin (client.c:221) ==20410== by 0x489DCAF: sasl_client_init (client.c:311) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 9 bytes in 1 blocks are still reachable in loss record 3 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x4E39037: generic_gss_add_oid_set_member (in /nix/store/yrh78gd3swn5a0z5lal4kra42a1ybl48-libkrb5-1.18/lib/libgssapi_krb5.so.2.2) ==20410== by 0x4E47DFE: gss_add_oid_set_member (in /nix/store/yrh78gd3swn5a0z5lal4kra42a1ybl48-libkrb5-1.18/lib/libgssapi_krb5.so.2.2) ==20410== by 0x4E4746C: gss_indicate_mechs_by_attrs (in /nix/store/yrh78gd3swn5a0z5lal4kra42a1ybl48-libkrb5-1.18/lib/libgssapi_krb5.so.2.2) ==20410== by 0x5627112: gs2_indicate_mechs (gs2.c:1365) ==20410== by 0x56271AC: gs2_common_plug_init (gs2.c:573) ==20410== by 0x56280A2: gs2_client_plug_init (gs2.c:961) ==20410== by 0x56280B7: sasl_client_plug_init (gs2_init.c:41) ==20410== by 0x489D20E: sasl_client_add_plugin (client.c:194) ==20410== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20410== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== ==20410== 12 bytes in 1 blocks are still reachable in loss record 4 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x48A4504: sasl_randcreate (saslutil.c:384) ==20410== by 0x48A035E: _sasl_alloc_utils (common.c:2009) ==20410== by 0x489D3A7: init_mechlist (client.c:68) ==20410== by 0x489DC96: sasl_client_init (client.c:305) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 12 bytes in 1 blocks are still reachable in loss record 5 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x48A4504: sasl_randcreate (saslutil.c:384) ==20410== by 0x48A035E: _sasl_alloc_utils (common.c:2009) ==20410== by 0x48A0642: _sasl_common_init (common.c:811) ==20410== by 0x489DCBB: sasl_client_init (client.c:313) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 16 bytes in 1 blocks are still reachable in loss record 6 of 29 ==20410== at 0x483A9A2: calloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x4E38EE5: generic_gss_create_empty_oid_set (in /nix/store/yrh78gd3swn5a0z5lal4kra42a1ybl48-libkrb5-1.18/lib/libgssapi_krb5.so.2.2) ==20410== by 0x4E4723C: gss_indicate_mechs_by_attrs (in /nix/store/yrh78gd3swn5a0z5lal4kra42a1ybl48-libkrb5-1.18/lib/libgssapi_krb5.so.2.2) ==20410== by 0x5627112: gs2_indicate_mechs (gs2.c:1365) ==20410== by 0x56271AC: gs2_common_plug_init (gs2.c:573) ==20410== by 0x56280A2: gs2_client_plug_init (gs2.c:961) ==20410== by 0x56280B7: sasl_client_plug_init (gs2_init.c:41) ==20410== by 0x489D20E: sasl_client_add_plugin (client.c:194) ==20410== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20410== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== ==20410== 20 bytes in 2 blocks are still reachable in loss record 7 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x56255BE: gs2_duplicate_buffer (gs2.c:1408) ==20410== by 0x5626FC3: gs2_client_plug_alloc (gs2.c:925) ==20410== by 0x56272AE: gs2_common_plug_init (gs2.c:597) ==20410== by 0x56280A2: gs2_client_plug_init (gs2.c:961) ==20410== by 0x56280B7: sasl_client_plug_init (gs2_init.c:41) ==20410== by 0x489D20E: sasl_client_add_plugin (client.c:194) ==20410== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20410== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== ==20410== 32 bytes in 1 blocks are still reachable in loss record 8 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x489DC72: sasl_client_init (client.c:298) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 32 bytes in 1 blocks are still reachable in loss record 9 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x489D2CB: sasl_client_add_plugin (client.c:217) ==20410== by 0x489DCAF: sasl_client_init (client.c:311) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 32 bytes in 1 blocks are still reachable in loss record 10 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x4E38F88: generic_gss_add_oid_set_member (in /nix/store/yrh78gd3swn5a0z5lal4kra42a1ybl48-libkrb5-1.18/lib/libgssapi_krb5.so.2.2) ==20410== by 0x4E47DFE: gss_add_oid_set_member (in /nix/store/yrh78gd3swn5a0z5lal4kra42a1ybl48-libkrb5-1.18/lib/libgssapi_krb5.so.2.2) ==20410== by 0x4E4746C: gss_indicate_mechs_by_attrs (in /nix/store/yrh78gd3swn5a0z5lal4kra42a1ybl48-libkrb5-1.18/lib/libgssapi_krb5.so.2.2) ==20410== by 0x5627112: gs2_indicate_mechs (gs2.c:1365) ==20410== by 0x56271AC: gs2_common_plug_init (gs2.c:573) ==20410== by 0x56280A2: gs2_client_plug_init (gs2.c:961) ==20410== by 0x56280B7: sasl_client_plug_init (gs2_init.c:41) ==20410== by 0x489D20E: sasl_client_add_plugin (client.c:194) ==20410== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20410== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== ==20410== 40 bytes in 1 blocks are still reachable in loss record 11 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x55E6725: digestmd5_client_plug_init (digestmd5.c:4641) ==20410== by 0x55E67F4: sasl_client_plug_init (digestmd5_init.c:41) ==20410== by 0x489D20E: sasl_client_add_plugin (client.c:194) ==20410== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20410== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== ==20410== 56 bytes in 2 blocks are still reachable in loss record 12 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x4007613: decompose_rpath.isra.10 (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x400974B: _dl_map_object (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x400D941: openaux (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x400DCD3: _dl_map_object_deps (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4013ADD: dl_open_worker (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x40135DC: _dl_open (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4E24245: dlopen_doit (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x49E11CE: _dl_catch_error (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 72 bytes in 1 blocks are still reachable in loss record 13 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x489FCBB: _sasl_strdup (common.c:179) ==20410== by 0x489FD84: _sasl_getpath (common.c:1598) ==20410== by 0x48A90F1: _sasl_load_plugins (dlopen.c:469) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 82 bytes in 12 blocks are still reachable in loss record 14 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x489FCBB: _sasl_strdup (common.c:179) ==20410== by 0x489D2F1: sasl_client_add_plugin (client.c:221) ==20410== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20410== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 112 bytes in 1 blocks are still reachable in loss record 15 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x48A2438: _sasl_build_mechlist (common.c:2374) ==20410== by 0x489DCF0: sasl_client_init (client.c:324) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 147 bytes in 2 blocks are still reachable in loss record 16 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x4006A32: open_path (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x400927B: _dl_map_object (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x400D941: openaux (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x400DCD3: _dl_map_object_deps (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4013ADD: dl_open_worker (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x40135DC: _dl_open (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4E24245: dlopen_doit (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x49E11CE: _dl_catch_error (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 147 bytes in 2 blocks are still reachable in loss record 17 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x400BB28: _dl_new_object (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4007BF5: _dl_map_object_from_fd (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4009096: _dl_map_object (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x400D941: openaux (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x400DCD3: _dl_map_object_deps (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4013ADD: dl_open_worker (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x40135DC: _dl_open (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4E24245: dlopen_doit (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 160 bytes in 10 blocks are still reachable in loss record 18 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x48A8FDD: _sasl_get_plugin (dlopen.c:379) ==20410== by 0x48A930D: _sasl_load_plugins (dlopen.c:527) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 192 bytes in 1 blocks are still reachable in loss record 19 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x56271C9: gs2_common_plug_init (gs2.c:577) ==20410== by 0x56280A2: gs2_client_plug_init (gs2.c:961) ==20410== by 0x56280B7: sasl_client_plug_init (gs2_init.c:41) ==20410== by 0x489D20E: sasl_client_add_plugin (client.c:194) ==20410== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20410== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== ==20410== 384 bytes in 12 blocks are still reachable in loss record 20 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x489D2CB: sasl_client_add_plugin (client.c:217) ==20410== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20410== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 392 bytes in 1 blocks are still reachable in loss record 21 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x48A0345: _sasl_alloc_utils (common.c:2003) ==20410== by 0x489D3A7: init_mechlist (client.c:68) ==20410== by 0x489DC96: sasl_client_init (client.c:305) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 392 bytes in 1 blocks are still reachable in loss record 22 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x48A0345: _sasl_alloc_utils (common.c:2003) ==20410== by 0x48A0642: _sasl_common_init (common.c:811) ==20410== by 0x489DCBB: sasl_client_init (client.c:313) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 870 bytes in 10 blocks are still reachable in loss record 23 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x401C3CA: strdup (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4009019: _dl_map_object (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4013A75: dl_open_worker (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x40135DC: _dl_open (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4E24245: dlopen_doit (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x49E11CE: _dl_catch_error (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x4E248F4: _dlerror_run (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x4E242C5: dlopen@@GLIBC_2.2.5 (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x48A8FF2: _sasl_get_plugin (dlopen.c:382) ==20410== ==20410== 870 bytes in 10 blocks are still reachable in loss record 24 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x400BB28: _dl_new_object (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4007BF5: _dl_map_object_from_fd (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4009096: _dl_map_object (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4013A75: dl_open_worker (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x40135DC: _dl_open (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4E24245: dlopen_doit (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x49E11CE: _dl_catch_error (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x4E248F4: _dlerror_run (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x4E242C5: dlopen@@GLIBC_2.2.5 (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== ==20410== 880 bytes in 1 blocks are still reachable in loss record 25 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x55E6779: digestmd5_client_plug_init (digestmd5.c:4654) ==20410== by 0x55E67F4: sasl_client_plug_init (digestmd5_init.c:41) ==20410== by 0x489D20E: sasl_client_add_plugin (client.c:194) ==20410== by 0x48A8F5C: _sasl_plugin_load (dlopen.c:239) ==20410== by 0x48A9151: _sasl_load_plugins (dlopen.c:533) ==20410== by 0x489DD43: sasl_client_init (client.c:316) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== ==20410== 2,280 bytes in 12 blocks are still reachable in loss record 26 of 29 ==20410== at 0x483A9A2: calloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x40112AC: _dl_check_map_versions (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4013B25: dl_open_worker (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x40135DC: _dl_open (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4E24245: dlopen_doit (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x49E11CE: _dl_catch_error (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x4E248F4: _dlerror_run (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x4E242C5: dlopen@@GLIBC_2.2.5 (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x48A8FF2: _sasl_get_plugin (dlopen.c:382) ==20410== by 0x48A930D: _sasl_load_plugins (dlopen.c:527) ==20410== ==20410== 2,395 bytes in 2 blocks are still reachable in loss record 27 of 29 ==20410== at 0x483A9A2: calloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x400B922: _dl_new_object (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4007BF5: _dl_map_object_from_fd (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4009096: _dl_map_object (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x400D941: openaux (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x400DCD3: _dl_map_object_deps (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4013ADD: dl_open_worker (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x40135DC: _dl_open (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4E24245: dlopen_doit (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 4,112 bytes in 1 blocks are still reachable in loss record 28 of 29 ==20410== at 0x4838753: malloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x489B76E: sasl_canonuser_add_plugin (canonusr.c:335) ==20410== by 0x48A060E: _sasl_common_init (common.c:816) ==20410== by 0x489DCBB: sasl_client_init (client.c:313) ==20410== by 0x485C321: ldap_int_sasl_init (cyrus.c:117) ==20410== by 0x4870D8E: ldap_int_initialize (init.c:662) ==20410== by 0x485620D: ldap_create (open.c:109) ==20410== by 0x4856491: ldap_initialize (open.c:241) ==20410== by 0x4013C6: run (main.c:68) ==20410== by 0x48D6DBC: (below main) (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== ==20410== 12,710 bytes in 10 blocks are still reachable in loss record 29 of 29 ==20410== at 0x483A9A2: calloc (in /nix/store/l7qvi4rjqh0b64d9pdjj8vxkwh2ibynz-valgrind-3.16.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==20410== by 0x400B922: _dl_new_object (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4007BF5: _dl_map_object_from_fd (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4009096: _dl_map_object (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4013A75: dl_open_worker (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x40135DC: _dl_open (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/ld-2.32.so) ==20410== by 0x4E24245: dlopen_doit (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x49E1134: _dl_catch_exception (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x49E11CE: _dl_catch_error (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libc-2.32.so) ==20410== by 0x4E248F4: _dlerror_run (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== by 0x4E242C5: dlopen@@GLIBC_2.2.5 (in /nix/store/1yvpgm763b3hvg8q4fzpzmflr5674x4j-glibc-2.32-10/lib/libdl-2.32.so) ==20410== ==20410== LEAK SUMMARY: ==20410== definitely lost: 0 bytes in 0 blocks ==20410== indirectly lost: 0 bytes in 0 blocks ==20410== possibly lost: 0 bytes in 0 blocks ==20410== still reachable: 26,473 bytes in 103 blocks ==20410== suppressed: 0 bytes in 0 blocks ==20410== ==20410== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) -------------------------------------------------
I'm using the NixOS package for openldap 2.4.56 for which you can find the build process here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/open.... The code for my executable is attached.
https://bugs.openldap.org/show_bug.cgi?id=9432
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Howard Chu hyc@openldap.org --- (In reply to sternenseemann from comment #0)
Created attachment 782 [details] Code for the first two examples, compiled with -lldap -lsasl2
I have a trivial program which just connects to a LDAP server optionally using TLS and does nothing further. If I use libldap compiled with SASL support, the executable leaks memory from ldap_initialize even though I call sasl_client_done() in the end:
Then you should open an issue with the Cyrus SASL folks.
https://bugs.openldap.org/show_bug.cgi?id=9432
--- Comment #2 from Howard Chu hyc@openldap.org --- (In reply to sternenseemann from comment #0)
Also note that if I don't call sasl_client_done() and link specifically againt cyrus sasl for that purpose, as I never call any sasl related functions, the executable leaks over 20K. It seems like an oversight to me that ldap_unbind_ext doesn't free anything SASL related.
That's because sasl_client_done() deinitializes the entire library, whereas ldap_unbind_ext is only for closing a single session. Since the allocations done by sasl_client_init() only occur once in the lifetime of a process, this isn't actually a significant leak. It would only be significant if it leaked every time a new session was created within the same process.
This ITS is invalid.
https://bugs.openldap.org/show_bug.cgi?id=9432
--- Comment #3 from sternenseemann@systemli.org --- (In reply to Howard Chu from comment #2)
That's because sasl_client_done() deinitializes the entire library, whereas ldap_unbind_ext is only for closing a single session. Since the allocations done by sasl_client_init() only occur once in the lifetime of a process, this isn't actually a significant leak. It would only be significant if it leaked every time a new session was created within the same process.
That's fair, but I feel like there should be at least some measure or documentation on this, since it is not obvious to an user of libldap that the library may have been linked against cyrus sasl and they subsequently have to call sasl_client_done().
https://bugs.openldap.org/show_bug.cgi?id=9432
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED