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 Detected on Adding Function to Scheme #71

Open
veeshi opened this issue May 9, 2021 · 1 comment
Open

Memory Leak Detected on Adding Function to Scheme #71

veeshi opened this issue May 9, 2021 · 1 comment

Comments

@veeshi
Copy link

veeshi commented May 9, 2021

Using cargo-valgrind on a project using wirefilter shows a memory leak using Scheme::add_function.

Valgrind output is:

       Error leaked 2.3 kiB in 1 block
        Info at malloc
             at alloc::alloc::alloc (alloc.rs:86)
             at hashbrown::raw::inner::RawTable<T>::new_uninitialized (mod.rs:411)
             at hashbrown::raw::inner::RawTable<T>::fallible_with_capacity (mod.rs:440)
             at hashbrown::raw::inner::RawTable<T>::resize (mod.rs:897)
             at hashbrown::raw::inner::RawTable<T>::reserve_rehash (mod.rs:778)
             at hashbrown::raw::inner::RawTable<T>::reserve (mod.rs:731)
             at hashbrown::raw::inner::RawTable<T>::insert (mod.rs:950)
             at indexmap::map::core::IndexMapCore<K,V>::push (core.rs:214)
             at indexmap::map::core::VacantEntry<K,V>::insert (core.rs:630)
             at wirefilter::scheme::Scheme::add_function (scheme.rs:579)

The exact line that seems to cause the leak is:

entry.insert(SchemeItem::Function(function.into()));

@veeshi veeshi changed the title Memory Leak Detected on Adding Scheme Memory Leak Detected on Adding Function to Scheme May 9, 2021
@marmeladema
Copy link
Collaborator

Hello and thank you for the bug report!

Could you provide a minimal reproducible code and instructions so that we can investigate?
That would be really helpful.

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