Skip to content

Full check leak report reachable bytes #135

Description

@NicolasHanus

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions