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 Detected Relating to GLib #79

Open
2 tasks
zakuArbor opened this issue Jul 29, 2023 · 1 comment
Open
2 tasks

Memory Leaks Detected Relating to GLib #79

zakuArbor opened this issue Jul 29, 2023 · 1 comment
Assignees
Labels
Bug Something isn't working PAM

Comments

@zakuArbor
Copy link
Owner

Purpose

  • running pam_test shows a lot of memory leaks
    #16 0x7f63808e009b in g_task_return_now (/lib64/libgio-2.0.so.0+0xb209b) (BuildId: 527b46dc68e9bd27393cac77da7c9ecda15eac19)
    #17 0x7f63808e00d4 in complete_in_idle_cb (/lib64/libgio-2.0.so.0+0xb20d4) (BuildId: 527b46dc68e9bd27393cac77da7c9ecda15eac19)
    #18 0x7f638073d48c in g_idle_dispatch (/lib64/libglib-2.0.so.0+0x5848c) (BuildId: dd6f24415c0a2d65fdd4c2ce98a158495431f611)
    #19 0x7f638074148b in g_main_context_dispatch (/lib64/libglib-2.0.so.0+0x5c48b) (BuildId: dd6f24415c0a2d65fdd4c2ce98a158495431f611)
    #20 0x7f638079f647 in g_main_context_iterate.isra.0 (/lib64/libglib-2.0.so.0+0xba647) (BuildId: dd6f24415c0a2d65fdd4c2ce98a158495431f611)
    #21 0x7f6380740a8e in g_main_loop_run (/lib64/libglib-2.0.so.0+0x5ba8e) (BuildId: dd6f24415c0a2d65fdd4c2ce98a158495431f611)
    #22 0x7f63809484b1 in gdbus_shared_thread_func.lto_priv.0 (/lib64/libgio-2.0.so.0+0x11a4b1) (BuildId: 527b46dc68e9bd27393cac77da7c9ecda15eac19)
    #23 0x7f638076f982 in g_thread_proxy (/lib64/libglib-2.0.so.0+0x8a982) (BuildId: dd6f24415c0a2d65fdd4c2ce98a158495431f611)
    #24 0x7f637feae906 in start_thread (/lib64/libc.so.6+0x8c906) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9)

SUMMARY: AddressSanitizer: 15384 byte(s) leaked in 377 allocation(s).

The likely culprit is pam_bt_pair.c::process_dbus_bt_list

Tasks/Goals

  • Read glib documentation to figure out which function calls allocates memory
  • Squash all memory leaks

Summary

To fill out once the issue is to be closed. Give a short summary of the changes you made to implement or fix an issue

@zakuArbor zakuArbor self-assigned this Jul 29, 2023
@zakuArbor zakuArbor added Bug Something isn't working PAM labels Jul 29, 2023
@zakuArbor
Copy link
Owner Author

zakuArbor commented Jul 29, 2023

g_variant_iter_next requires one to free the key and value pair at each iteration
* reduced 335 bytes
g_variant_dict_init requires a call to clear the dictionary

SUMMARY: AddressSanitizer: 14450 byte(s) leaked in 344 allocation(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working PAM
Projects
None yet
Development

No branches or pull requests

1 participant