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 leak inside p11_kit_remote_serve_tokens #522

Closed
ZoltanFridrich opened this issue Jun 23, 2023 · 2 comments · Fixed by #524
Closed

Memory leak inside p11_kit_remote_serve_tokens #522

ZoltanFridrich opened this issue Jun 23, 2023 · 2 comments · Fixed by #524
Assignees
Labels
Milestone

Comments

@ZoltanFridrich
Copy link
Contributor

ZoltanFridrich commented Jun 23, 2023

==396953==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 720 byte(s) in 1 object(s) allocated from:
#0 0x7f3c3fcd8cd7 in calloc (/lib64/libasan.so.8+0xd8cd7) (BuildId: dc689b05ca2577037af24700212bb5cce1f91c8a)
#1 0x5e9a30 in p11_kit_remote_serve_tokens ../p11-kit/rpc-server.c:2758
#2 0x405f3e in main ../p11-kit/remote.c:133
#3 0x7f3c3fa49b49 in __libc_start_call_main (/lib64/libc.so.6+0x27b49) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9)
#4 0x7f3c3fa49c0a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c0a) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9)
#5 0x405834 in _start (/home/zfridric/upstream/p11-kit/_build/p11-kit/p11-kit-remote-testable+0x405834) (BuildId: 3207fed024af4b90b1d46ed26781ab2ccf8521d9)

SUMMARY: AddressSanitizer: 720 byte(s) leaked in 1 allocation(s).

https://github.com/p11-glue/p11-kit/blob/master/p11-kit/rpc-server.c#L2758

@ueno
Copy link
Member

ueno commented Jun 27, 2023

How did you run into this? I tried with -Db_sanitize=address but couldn't reproduce it.

@ZoltanFridrich
Copy link
Contributor Author

How did you run into this? I tried with -Db_sanitize=address but couldn't reproduce it.

meson setup -Db_sanitize=address _build
meson compile -C _build
meson test -C _build

the tests will pass but the log will contain memory leak report.
just check _build/meson-logs/testlog.txt and it should be under test-server stderr

@ZoltanFridrich ZoltanFridrich added this to the 0.25.0 milestone Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants