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

Full check leak report reachable bytes #135

Open
NicolasHanus opened this issue Apr 14, 2022 · 1 comment
Open

Full check leak report reachable bytes #135

NicolasHanus opened this issue Apr 14, 2022 · 1 comment

Comments

@NicolasHanus
Copy link

NicolasHanus commented Apr 14, 2022

I am running valgrind with a full leak check :

valgrind --leak-check=full --show-leak-kinds=all myExecutable

It reports reachable bytes that seem linked to the usage of LruCache:

==9046== 8 bytes in 1 blocks are still reachable in loss record 2 of 6
==9046==    at 0x483C855: malloc (vg_replace_malloc.c:380)
==9046==    by 0x19004C: once_cell::race::once_box::OnceBox<T>::get_or_init (in /mnt/c/Users/nhanus/dev/git/native/src/simulator/target/release/deps/checkpointing_test-279e8b44c56500c1)
==9046==    by 0x18F12F: lru::LruCache<K,V>::new (in /mnt/c/Users/nhanus/dev/git/native/src/simulator/target/release/deps/checkpointing_test-279e8b44c56500c1)

And

==9160== 64 bytes in 1 blocks are still reachable in loss record 4 of 6
==9160==    at 0x483C855: malloc (vg_replace_malloc.c:380)
==9160==    by 0x1954A4: <ahash::random_state::DefaultRandomSource as ahash::random_state::RandomSource>::get_fixed_seeds (in /mnt/c/Users/nhanus/dev/git/native/src/simulator/target/release/deps/checkpointing_test-279e8b44c56500c1)
==9160==    by 0x18F13C: lru::LruCache<K,V>::new (in /mnt/c/Users/nhanus/dev/git/native/src/simulator/target/release/deps/checkpointing_test-279e8b44c56500c1)

Could you please advise if I'm doing a misuse of the cache, or if there a real issue ? Thx

@javierhonduco
Copy link

@NicolasHanus Hi, I am not the maintainer, but I am currently evaluating lru-rs and would love to help. Can you share a small reproducer of this potential leak? Thanks!

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

No branches or pull requests

2 participants