Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leaks in test_libomemo #51

Open
hades opened this issue Oct 7, 2023 · 1 comment · May be fixed by #55
Open

memory leaks in test_libomemo #51

hades opened this issue Oct 7, 2023 · 1 comment · May be fixed by #55

Comments

@hades
Copy link

hades commented Oct 7, 2023

When running test_libomemo with address sanitizer, the following memory leaks are found.

To reproduce:

git clone https://github.com/hades/libomemo.git
cd libomemo
git checkout efcf195c243e95131b49d83209b232b70b1e2f27
mkdir build ; cd build
CC=clang cmake .. -DOMEMO_WITH_ASAN=ON
make
ctest --output-on-failure

Error output:

=================================================================
==15714==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1436 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b51d373 in strdup (/home/hades/dev/libomemo/build/test_libomemo+0x97373) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x7f3e19ad4b0f in mxmlSaveAllocString /build/mxml-ZxgGso/mxml-3.3.1/mxml-file.c:226:13
    #2 0x563b1b57bc13 in test_bundle_export /home/hades/dev/libomemo/test/test_libomemo.c:440:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 79 byte(s) in 7 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x7f3e19b3e948 in g_malloc /usr/src/glib2.0-2.76.1-1/debian/build/deb/../../../glib/gmem.c:130:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b581186 in test_message_export_encrypted_strip_xhtml /home/hades/dev/libomemo/test/test_libomemo.c:1052:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b57fd26 in test_message_add_recipient /home/hades/dev/libomemo/test/test_libomemo.c:905:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b580b54 in test_message_export_encrypted_with_extra_tags_and_body /home/hades/dev/libomemo/test/test_libomemo.c:999:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b581ccb in test_message_export_encrypted_with_eme /home/hades/dev/libomemo/test/test_libomemo.c:1155:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b581516 in test_message_export_encrypted_strip_multiple_body /home/hades/dev/libomemo/test/test_libomemo.c:1085:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b57dbcc in test_message_prepare_encryption /home/hades/dev/libomemo/test/test_libomemo.c:693:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b580166 in test_message_add_recipient_w_prekey /home/hades/dev/libomemo/test/test_libomemo.c:937:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b57483d in omemo_message_prepare_decryption /home/hades/dev/libomemo/test/../src/libomemo.c:1314:11
    #2 0x563b1b58308a in test_message_encrypt_decrypt_with_extra_nodes /home/hades/dev/libomemo/test/test_libomemo.c:1260:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b57483d in omemo_message_prepare_decryption /home/hades/dev/libomemo/test/../src/libomemo.c:1314:11
    #2 0x563b1b5842fb in test_message_encrypt_decrypt_with_added_eme /home/hades/dev/libomemo/test/test_libomemo.c:1356:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b583a7b in test_message_encrypt_decrypt_with_added_body /home/hades/dev/libomemo/test/test_libomemo.c:1305:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b57483d in omemo_message_prepare_decryption /home/hades/dev/libomemo/test/../src/libomemo.c:1314:11
    #2 0x563b1b57fae2 in test_message_get_encrypted_key_no_keys /home/hades/dev/libomemo/test/test_libomemo.c:888:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b57e443 in test_message_prepare_encryption_with_extra_data /home/hades/dev/libomemo/test/test_libomemo.c:725:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b584852 in test_message_get_names /home/hades/dev/libomemo/test/test_libomemo.c:1391:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b57483d in omemo_message_prepare_decryption /home/hades/dev/libomemo/test/../src/libomemo.c:1314:11
    #2 0x563b1b582588 in test_message_encrypt_decrypt /home/hades/dev/libomemo/test/test_libomemo.c:1208:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b58419b in test_message_encrypt_decrypt_with_added_eme /home/hades/dev/libomemo/test/test_libomemo.c:1346:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b582410 in test_message_encrypt_decrypt /home/hades/dev/libomemo/test/test_libomemo.c:1198:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b582f18 in test_message_encrypt_decrypt_with_extra_nodes /home/hades/dev/libomemo/test/test_libomemo.c:1250:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b5818a6 in test_message_export_encrypted_strip_xhtml_and_body /home/hades/dev/libomemo/test/test_libomemo.c:1125:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b57db8f in test_message_prepare_encryption /home/hades/dev/libomemo/test/test_libomemo.c:691:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b57483d in omemo_message_prepare_decryption /home/hades/dev/libomemo/test/../src/libomemo.c:1314:11
    #2 0x563b1b583bdb in test_message_encrypt_decrypt_with_added_body /home/hades/dev/libomemo/test/test_libomemo.c:1315:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b580547 in test_message_export_encrypted /home/hades/dev/libomemo/test/test_libomemo.c:962:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b572365 in omemo_message_create /home/hades/dev/libomemo/test/../src/libomemo.c:1005:11
    #2 0x563b1b573062 in omemo_message_prepare_encryption /home/hades/dev/libomemo/test/../src/libomemo.c:1095:13
    #3 0x563b1b57eb4f in test_message_get_key /home/hades/dev/libomemo/test/test_libomemo.c:756:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b57483d in omemo_message_prepare_decryption /home/hades/dev/libomemo/test/../src/libomemo.c:1314:11
    #2 0x563b1b57ed72 in test_message_get_encrypted_key /home/hades/dev/libomemo/test/test_libomemo.c:779:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b57483d in omemo_message_prepare_decryption /home/hades/dev/libomemo/test/../src/libomemo.c:1314:11
    #2 0x563b1b57f792 in test_message_get_encrypted_key_after_iv /home/hades/dev/libomemo/test/test_libomemo.c:860:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b57483d in omemo_message_prepare_decryption /home/hades/dev/libomemo/test/../src/libomemo.c:1314:11
    #2 0x563b1b57f0b0 in test_message_is_encrypted_key_prekey /home/hades/dev/libomemo/test/test_libomemo.c:816:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d1b5 in omemo_bundle_create /home/hades/dev/libomemo/test/../src/libomemo.c:164:29
    #2 0x563b1b57b7f6 in test_bundle_export /home/hades/dev/libomemo/test/test_libomemo.c:417:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d1b5 in omemo_bundle_create /home/hades/dev/libomemo/test/../src/libomemo.c:164:29
    #2 0x563b1b57a62a in test_bundle_set_device_id /home/hades/dev/libomemo/test/test_libomemo.c:321:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 14 byte(s) in 2 object(s) allocated from:
    #0 0x563b1b533228 in __interceptor_calloc (/home/hades/dev/libomemo/build/test_libomemo+0xad228) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x7f3e19b3f550 in g_malloc0 /usr/src/glib2.0-2.76.1-1/debian/build/deb/../../../glib/gmem.c:163:13

Direct leak of 8 byte(s) in 2 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b570a72 in omemo_devicelist_import /home/hades/dev/libomemo/test/../src/libomemo.c:759:28
    #2 0x563b1b578a43 in test_devicelist_remove /home/hades/dev/libomemo/test/test_libomemo.c:179:3
    #3 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d47b in int_to_string /home/hades/dev/libomemo/test/../src/libomemo.c:111:16
    #2 0x563b1b570fea in omemo_devicelist_add /home/hades/dev/libomemo/test/../src/libomemo.c:795:23
    #3 0x563b1b578889 in test_devicelist_contains_id /home/hades/dev/libomemo/test/test_libomemo.c:170:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d47b in int_to_string /home/hades/dev/libomemo/test/../src/libomemo.c:111:16
    #2 0x563b1b570fea in omemo_devicelist_add /home/hades/dev/libomemo/test/../src/libomemo.c:795:23
    #3 0x563b1b5786ca in test_devicelist_contains_id /home/hades/dev/libomemo/test/test_libomemo.c:162:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d47b in int_to_string /home/hades/dev/libomemo/test/../src/libomemo.c:111:16
    #2 0x563b1b570fea in omemo_devicelist_add /home/hades/dev/libomemo/test/../src/libomemo.c:795:23
    #3 0x563b1b578145 in test_devicelist_add /home/hades/dev/libomemo/test/test_libomemo.c:136:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 6 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d47b in int_to_string /home/hades/dev/libomemo/test/../src/libomemo.c:111:16
    #2 0x563b1b570fea in omemo_devicelist_add /home/hades/dev/libomemo/test/../src/libomemo.c:795:23
    #3 0x563b1b579ac2 in test_devicelist_export /home/hades/dev/libomemo/test/test_libomemo.c:246:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 6 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d47b in int_to_string /home/hades/dev/libomemo/test/../src/libomemo.c:111:16
    #2 0x563b1b570fea in omemo_devicelist_add /home/hades/dev/libomemo/test/../src/libomemo.c:795:23
    #3 0x563b1b579a7b in test_devicelist_export /home/hades/dev/libomemo/test/test_libomemo.c:245:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 5 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d47b in int_to_string /home/hades/dev/libomemo/test/../src/libomemo.c:111:16
    #2 0x563b1b570fea in omemo_devicelist_add /home/hades/dev/libomemo/test/../src/libomemo.c:795:23
    #3 0x563b1b5795f6 in test_devicelist_diff /home/hades/dev/libomemo/test/test_libomemo.c:228:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 5 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d47b in int_to_string /home/hades/dev/libomemo/test/../src/libomemo.c:111:16
    #2 0x563b1b570fea in omemo_devicelist_add /home/hades/dev/libomemo/test/../src/libomemo.c:795:23
    #3 0x563b1b5795a6 in test_devicelist_diff /home/hades/dev/libomemo/test/test_libomemo.c:227:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Direct leak of 5 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d47b in int_to_string /home/hades/dev/libomemo/test/../src/libomemo.c:111:16
    #2 0x563b1b570fea in omemo_devicelist_add /home/hades/dev/libomemo/test/../src/libomemo.c:795:23
    #3 0x563b1b579337 in test_devicelist_diff /home/hades/dev/libomemo/test/test_libomemo.c:219:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Indirect leak of 5984 byte(s) in 68 object(s) allocated from:
    #0 0x563b1b533228 in __interceptor_calloc (/home/hades/dev/libomemo/build/test_libomemo+0xad228) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x7f3e19ad3fe1 in mxml_new /build/mxml-ZxgGso/mxml-3.3.1/mxml-node.c:836:15
    #2 0x7f3e19ad3fe1 in mxmlNewElement /build/mxml-ZxgGso/mxml-3.3.1/mxml-node.c:382:15

Indirect leak of 4840 byte(s) in 55 object(s) allocated from:
    #0 0x563b1b533228 in __interceptor_calloc (/home/hades/dev/libomemo/build/test_libomemo+0xad228) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x7f3e19ad40b1 in mxml_new /build/mxml-ZxgGso/mxml-3.3.1/mxml-node.c:836:15
    #2 0x7f3e19ad40b1 in mxmlNewOpaque /build/mxml-ZxgGso/mxml-3.3.1/mxml-node.c:451:15

Indirect leak of 577 byte(s) in 68 object(s) allocated from:
    #0 0x563b1b51d373 in strdup (/home/hades/dev/libomemo/build/test_libomemo+0x97373) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x7f3e19ad400f in mxmlNewElement /build/mxml-ZxgGso/mxml-3.3.1/mxml-node.c:383:32

Indirect leak of 496 byte(s) in 31 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x7f3e19ad4d5e in mxml_set_attr /build/mxml-ZxgGso/mxml-3.3.1/mxml-attr.c:322:12

Indirect leak of 481 byte(s) in 59 object(s) allocated from:
    #0 0x563b1b51d373 in strdup (/home/hades/dev/libomemo/build/test_libomemo+0x97373) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x7f3e19ad4e0d in mxmlElementSetAttr /build/mxml-ZxgGso/mxml-3.3.1/mxml-attr.c:221:19
    #2 0x7f3e19ad4e0d in mxmlElementSetAttr /build/mxml-ZxgGso/mxml-3.3.1/mxml-attr.c:200:1

Indirect leak of 448 byte(s) in 12 object(s) allocated from:
    #0 0x563b1b533466 in __interceptor_realloc (/home/hades/dev/libomemo/build/test_libomemo+0xad466) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x7f3e19ad4db2 in mxml_set_attr /build/mxml-ZxgGso/mxml-3.3.1/mxml-attr.c:324:12

Indirect leak of 445 byte(s) in 55 object(s) allocated from:
    #0 0x563b1b51d373 in strdup (/home/hades/dev/libomemo/build/test_libomemo+0x97373) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x7f3e19ad40e5 in mxmlNewOpaque /build/mxml-ZxgGso/mxml-3.3.1/mxml-node.c:452:26

Indirect leak of 399 byte(s) in 59 object(s) allocated from:
    #0 0x563b1b51d373 in strdup (/home/hades/dev/libomemo/build/test_libomemo+0x97373) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x7f3e19ad4d80 in mxml_set_attr /build/mxml-ZxgGso/mxml-3.3.1/mxml-attr.c:337:21

Indirect leak of 5 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d47b in int_to_string /home/hades/dev/libomemo/test/../src/libomemo.c:111:16
    #2 0x563b1b56d330 in omemo_bundle_set_device_id /home/hades/dev/libomemo/test/../src/libomemo.c:177:13
    #3 0x563b1b57bae6 in test_bundle_export /home/hades/dev/libomemo/test/test_libomemo.c:432:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

Indirect leak of 5 byte(s) in 1 object(s) allocated from:
    #0 0x563b1b53303e in __interceptor_malloc (/home/hades/dev/libomemo/build/test_libomemo+0xad03e) (BuildId: 430d8118ea580c8c9db54c4182f11db0faed2305)
    #1 0x563b1b56d47b in int_to_string /home/hades/dev/libomemo/test/../src/libomemo.c:111:16
    #2 0x563b1b56d330 in omemo_bundle_set_device_id /home/hades/dev/libomemo/test/../src/libomemo.c:177:13
    #3 0x563b1b57a671 in test_bundle_set_device_id /home/hades/dev/libomemo/test/test_libomemo.c:323:3
    #4 0x7f3e19d73aab in cmocka_run_one_test_or_fixture obj-x86_64-linux-gnu/src/./src/cmocka.c:2801:13

SUMMARY: AddressSanitizer: 16961 byte(s) leaked in 456 allocation(s).
@hades hades linked a pull request Oct 16, 2023 that will close this issue
@Neustradamus
Copy link
Contributor

@gkdr: Have you seen this issue?

There is a PR to solve it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants