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 pc_patch_compress #111

Open
achidlow opened this issue Jun 21, 2016 · 0 comments
Open

memory leak in pc_patch_compress #111

achidlow opened this issue Jun 21, 2016 · 0 comments

Comments

@achidlow
Copy link
Contributor

achidlow commented Jun 21, 2016

Found a leak by running valgrind on my python unit tests.

It's because pc_patch_free is what frees the PCSTATS but pc_patch_dimensional_free is called instead.

==25371== 114 (72 direct, 42 indirect) bytes in 1 blocks are definitely lost in loss record 618 of 1,663
==25371==    at 0x4C29C0F: malloc (vg_replace_malloc.c:299)
==25371==    by 0x154CF34A: default_allocator (pc_mem.c:40)
==25371==    by 0x154CF5EE: pcalloc (pc_mem.c:136)
==25371==    by 0x154D4DBD: pc_stats_clone (pc_stats.c:133)
==25371==    by 0x154D08DF: pc_patch_dimensional_from_uncompressed (pc_patch_dimensional.c:87)
==25371==    by 0x154CFBBF: pc_patch_compress (pc_patch.c:142)
==25371==    by 0x154B0C0E: __pyx_pf_4pgpc_7PcPatch_10compressed (pgpc.c:7595)
==25371==    by 0x154B0C0E: __pyx_pw_4pgpc_7PcPatch_11compressed (pgpc.c:7574)
==25371==    by 0x53EE15: PyEval_EvalFrameEx (in /usr/bin/python3.5)
<snipped>
==25371==    by 0x5C3676: PyObject_Call (in /usr/bin/python3.5)
==25371==    by 0x4DEB5D: ??? (in /usr/bin/python3.5)
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