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 cb_insert #558

Open
ennorehling opened this issue Sep 7, 2016 · 1 comment
Open

memory leak in cb_insert #558

ennorehling opened this issue Sep 7, 2016 · 1 comment
Labels

Comments

@ennorehling
Copy link
Member

valgrind now reports only 4 memory leaks in test_eressea. That's pretty great, but they are all pointing to one function: cb_insert. I guess it's a bug in the critbit submodule, but would have to push on it a bit and reproduce it in a tighter test.

HEAP SUMMARY:
    in use at exit: 5,663 bytes in 142 blocks
  total heap usage: 297,153 allocs, 297,011 frees, 21,491,138 bytes allocated

32 bytes in 1 blocks are definitely lost in loss record 84 of 142
   at 0x4C28BED: malloc (vg_replace_malloc.c:263)
   by 0x518563: make_internal_node (critbit.c:69)
   by 0x51883E: cb_insert (critbit.c:135)
   by 0x4DFE7A: set_param (config.c:592)
   by 0x4E0EB4: config_set (config.c:1050)
   by 0x43921B: test_rules (otherfaction.test.c:29)
   by 0x515C16: CuTestRun (CuTest.c:143)
   by 0x51624F: CuSuiteRun (CuTest.c:289)
   by 0x41B56C: RunTests (test_eressea.c:45)
   by 0x41C909: RunAllTests (test_eressea.c:144)
   by 0x41CA3D: main (test_eressea.c:169)

32 bytes in 1 blocks are definitely lost in loss record 85 of 142
   at 0x4C28BED: malloc (vg_replace_malloc.c:263)
   by 0x518563: make_internal_node (critbit.c:69)
   by 0x51883E: cb_insert (critbit.c:135)
   by 0x4DFE7A: set_param (config.c:592)
   by 0x4E0EB4: config_set (config.c:1050)
   by 0x42ABC1: test_peasant_luck_effect (laws.test.c:743)
   by 0x515C16: CuTestRun (CuTest.c:143)
   by 0x51624F: CuSuiteRun (CuTest.c:289)
   by 0x41B56C: RunTests (test_eressea.c:45)
   by 0x41C909: RunAllTests (test_eressea.c:144)
   by 0x41CA3D: main (test_eressea.c:169)

32 bytes in 1 blocks are definitely lost in loss record 86 of 142
   at 0x4C28BED: malloc (vg_replace_malloc.c:263)
   by 0x518563: make_internal_node (critbit.c:69)
   by 0x51883E: cb_insert (critbit.c:135)
   by 0x4DFE7A: set_param (config.c:592)
   by 0x442C5E: test_get_set_param (config.test.c:128)
   by 0x515C16: CuTestRun (CuTest.c:143)
   by 0x51624F: CuSuiteRun (CuTest.c:289)
   by 0x41B56C: RunTests (test_eressea.c:45)
   by 0x41C909: RunAllTests (test_eressea.c:144)
   by 0x41CA3D: main (test_eressea.c:169)

32 bytes in 1 blocks are definitely lost in loss record 87 of 142
   at 0x4C28BED: malloc (vg_replace_malloc.c:263)
   by 0x518563: make_internal_node (critbit.c:69)
   by 0x51883E: cb_insert (critbit.c:135)
   by 0x4DFE7A: set_param (config.c:592)
   by 0x442CE4: test_get_set_param (config.test.c:131)
   by 0x515C16: CuTestRun (CuTest.c:143)
   by 0x51624F: CuSuiteRun (CuTest.c:289)
   by 0x41B56C: RunTests (test_eressea.c:45)
   by 0x41C909: RunAllTests (test_eressea.c:144)
   by 0x41CA3D: main (test_eressea.c:169)

LEAK SUMMARY:
   definitely lost: 128 bytes in 4 blocks
   indirectly lost: 0 bytes in 0 blocks
     possibly lost: 0 bytes in 0 blocks
   still reachable: 5,535 bytes in 138 blocks
        suppressed: 0 bytes in 0 blocks
Reachable blocks (those to which a pointer was found) are not shown.
To see them, rerun with: --leak-check=full --show-reachable=yes

For counts of detected and suppressed errors, rerun with: -v
ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 6 from 6)
@ennorehling ennorehling added the bug label Sep 7, 2016
@ennorehling
Copy link
Member Author

Actually, this already reproduces with the test suite for critbit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant