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 in test tests::can_load_grammar #46

Open
icmccorm opened this issue Dec 5, 2023 · 1 comment
Open

Memory leak in test tests::can_load_grammar #46

icmccorm opened this issue Dec 5, 2023 · 1 comment

Comments

@icmccorm
Copy link

icmccorm commented Dec 5, 2023

Valgrind reports the following memory leak when running the test tests::can_load_grammar.

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s

       Error leaked 24.0 kiB in 1 block
        Info at calloc
             at hashmap_create (src/uthash.h:199)
             at get_tag_map (src/uthash.h:582)
             at tree_sitter_svelte_external_scanner_create (src/scanner.c:408)
             at ts_parser_set_language (src/./parser.c:1794)
             at tree_sitter::Parser::set_language (lib.rs:363)
             at tree_sitter_svelte::tests::can_load_grammar (lib.rs:72)
             at tree_sitter_svelte::tests::can_load_grammar::{{closure}} (lib.rs:70)
             at core::ops::function::FnOnce::call_once (function.rs:250)
             at test::__rust_begin_short_backtrace
             at test::types::RunnableTest::run
             at test::run_test_in_process
     Summary Leaked 24.0 kiB total

(This was originally found using MiriLLI—we were using Valgrind as a smoke check at the time. Leaving this message here, since a link to this issue is included in our dataset.)

@icmccorm
Copy link
Author

This issue is fixed when upgrading to a later version of tree-sitter.

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

1 participant