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 leaks in splicing_mutation #25

Closed
h1994st opened this issue Apr 24, 2021 · 0 comments
Closed

Memory leaks in splicing_mutation #25

h1994st opened this issue Apr 24, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@h1994st
Copy link
Collaborator

h1994st commented Apr 24, 2021

As indicated by CI results, there are 5 memory leaks in splicing_mutation (see below).

Better to throw an error while encountering memory leaks?

==4365== 8 bytes in 1 blocks are indirectly lost in loss record 1 of 5
==4365==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==4365==    by 0x48ED894: node_init_subnodes (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EDB6F: node_clone (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EE647: tree_clone (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EEE9C: splicing_mutation (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x117A81: TreeMutationTest_SplicingMutation_Test::TestBody() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x14AD80: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13E369: testing::Test::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13E801: testing::TestInfo::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13EA0D: testing::TestSuite::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13FACC: testing::internal::UnitTestImpl::RunAllTests() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x140037: testing::UnitTest::Run() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365== 
==4365== 64 bytes in 1 blocks are indirectly lost in loss record 2 of 5
==4365==    at 0x483B723: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==4365==    by 0x483E017: realloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==4365==    by 0x48EDA66: node_set_val (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EDB45: node_clone (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EDB8B: node_clone (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EE647: tree_clone (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EEE9C: splicing_mutation (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x117A81: TreeMutationTest_SplicingMutation_Test::TestBody() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x14AD80: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13E369: testing::Test::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13E801: testing::TestInfo::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13EA0D: testing::TestSuite::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365== 
==4365== 72 bytes in 1 blocks are indirectly lost in loss record 3 of 5
==4365==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==4365==    by 0x48ED7A9: node_create (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EDB20: node_clone (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EE647: tree_clone (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EEE9C: splicing_mutation (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x117A81: TreeMutationTest_SplicingMutation_Test::TestBody() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x14AD80: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13E369: testing::Test::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13E801: testing::TestInfo::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13EA0D: testing::TestSuite::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13FACC: testing::internal::UnitTestImpl::RunAllTests() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x140037: testing::UnitTest::Run() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365== 
==4365== 72 bytes in 1 blocks are indirectly lost in loss record 4 of 5
==4365==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==4365==    by 0x48ED7A9: node_create (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EDB20: node_clone (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EDB8B: node_clone (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EE647: tree_clone (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EEE9C: splicing_mutation (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x117A81: TreeMutationTest_SplicingMutation_Test::TestBody() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x14AD80: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13E369: testing::Test::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13E801: testing::TestInfo::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13EA0D: testing::TestSuite::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13FACC: testing::internal::UnitTestImpl::RunAllTests() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365== 
==4365== 288 (72 direct, 216 indirect) bytes in 1 blocks are definitely lost in loss record 5 of 5
==4365==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==4365==    by 0x48EE63C: tree_clone (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x48EEE9C: splicing_mutation (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/src/libgrammarmutator-ruby.so)
==4365==    by 0x117A81: TreeMutationTest_SplicingMutation_Test::TestBody() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x14AD80: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13E369: testing::Test::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13E801: testing::TestInfo::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13EA0D: testing::TestSuite::Run() [clone .part.0] (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x13FACC: testing::internal::UnitTestImpl::RunAllTests() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x140037: testing::UnitTest::Run() (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==    by 0x116E23: main (in /home/runner/work/Grammar-Mutator/Grammar-Mutator/tests/test_tree_mutation)
==4365==
@h1994st h1994st added the bug Something isn't working label Apr 24, 2021
@h1994st h1994st self-assigned this Apr 24, 2021
@h1994st h1994st added this to To do in Grammar mutator via automation Apr 24, 2021
@h1994st h1994st moved this from To do to In progress in Grammar mutator Apr 24, 2021
@h1994st h1994st closed this as completed Apr 25, 2021
Grammar mutator automation moved this from In progress to Done Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

1 participant