After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695130 - CCallback leaks in test_gi.TestPythonGObject.test_callback_in_vfunc
CCallback leaks in test_gi.TestPythonGObject.test_callback_in_vfunc
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks: 693111
 
 
Reported: 2013-03-04 15:29 UTC by Martin Pitt
Modified: 2014-08-08 09:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin Pitt 2013-03-04 15:29:42 UTC
This test case leaks its CCallback:



=24876== 128 bytes in 2 blocks are definitely lost in loss record 3,110 of 4,755
==24876==    at 0x4C2CD7B: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==24876==    by 0x427DC8: PyType_GenericAlloc (typeobject.c:752)
==24876==    by 0xA5434F1: _pygi_ccallback_new (pygi-ccallback.c:66)
==24876==    by 0xA5420F5: _pygi_closure_convert_arguments (pygi-closure.c:338)
==24876==    by 0xA542BE4: _pygi_closure_handle (pygi-closure.c:489)
==24876==    by 0xB7229F6: ffi_closure_unix64_inner (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.1)
==24876==    by 0xB722D7F: ffi_closure_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.1)
==24876==    by 0xD5F8F19: gi_marshalling_tests_object_call_vfunc_with_callback (gimarshallingtests.c:4126)
==24876==    by 0xB722C17: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.1)
==24876==    by 0xB72257F: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.1)
==24876==    by 0xA78AB86: g_callable_info_invoke (gicallableinfo.c:680)
==24876==    by 0xA78C706: g_function_info_invoke (gifunctioninfo.c:274)
==24876== 
==24876== LEAK SUMMARY:
==24876==    definitely lost: 128 bytes in 2 blocks
==24876==    indirectly lost: 0 bytes in 0 blocks
Comment 1 Simon Feltman 2014-08-08 09:35:11 UTC
Simple fix, we just needed to call tp_free().