Hello!

I've changed the automatic testing so that syncevo-dbus-server is
started under valgrindcheck.sh by test-dbus.py. This revealed some minor
memory leaks and broken memory accesses (typically read after free). I
I've fixed all of that, see master branch.

The last remaining issue seems to be a leak in the error path of GIO
GDBus: when a service is not available,
g_dbus_connection_new_for_address_sync() leaks some memory.

http://syncev.meego.com/2011-12-01-10-06_syncevolution_dbus_gio-gdbus/gio-gdbus/6-dbus/output.txt

==10608== 60 (16 direct, 44 indirect) bytes in 1 blocks are definitely lost in 
loss record 911 of 1,653
==10608==    at 0x4C27673: malloc (vg_replace_malloc.c:263)
==10608==    by 0x7FABC02: g_malloc (in 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3000.2)
==10608==    by 0x7FC0976: g_slice_alloc (in 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3000.2)
==10608==    by 0x7F9045F: g_error_copy (in 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3000.2)
==10608==    by 0x76700B1: ??? (in 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3000.2)
==10608==    by 0x761465E: g_initable_new_valist (in 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3000.2)
==10608==    by 0x7614748: g_initable_new (in 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3000.2)
==10608==    by 0x766EB1E: g_dbus_connection_new_for_address_sync (in 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3000.2)
==10608==    by 0x597E08: GDBusCXX::dbus_get_bus_connection(char const*, char 
const*, bool, GDBusCXX::DBusErrorCXX*) (gdbus-cxx-bridge.cpp:58)
==10608==    by 0x583CB8: 
SyncEvo::ConnmanClient::ConnmanClient(SyncEvo::Server&) (connman-client.cpp:30)
==10608==    by 0x541730: SyncEvo::Server::Server(_GMainLoop*, bool&, 
boost::shared_ptr<SyncEvo::Restart>&, GDBusCXX::DBusConnectionPtr const&, int) 
(server.cpp:239)
==10608==    by 0x52141B: main (main.cpp:113)

==10608== 60 (16 direct, 44 indirect) bytes in 1 blocks are definitely lost in 
loss record 912 of 1,653
==10608==    at 0x4C27673: malloc (vg_replace_malloc.c:263)
==10608==    by 0x7FABC02: g_malloc (in 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3000.2)
==10608==    by 0x7FC0976: g_slice_alloc (in 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3000.2)
==10608==    by 0x7F9045F: g_error_copy (in 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3000.2)
==10608==    by 0x76700B1: ??? (in 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3000.2)
==10608==    by 0x761465E: g_initable_new_valist (in 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3000.2)
==10608==    by 0x7614748: g_initable_new (in 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3000.2)
==10608==    by 0x766EB1E: g_dbus_connection_new_for_address_sync (in 
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3000.2)
==10608==    by 0x597E08: GDBusCXX::dbus_get_bus_connection(char const*, char 
const*, bool, GDBusCXX::DBusErrorCXX*) (gdbus-cxx-bridge.cpp:58)
==10608==    by 0x58A9EE: 
SyncEvo::NetworkManagerClient::NetworkManagerClient(SyncEvo::Server&) 
(network-manager-client.cpp:31)
==10608==    by 0x541747: SyncEvo::Server::Server(_GMainLoop*, bool&, 
boost::shared_ptr<SyncEvo::Restart>&, GDBusCXX::DBusConnectionPtr const&, int) 
(server.cpp:239)
==10608==    by 0x52141B: main (main.cpp:113)

Chris, do you agree that this isn't something caused by our code?

If yes, then I'll suppress this particular problem.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.


_______________________________________________
SyncEvolution mailing list
SyncEvolution@syncevolution.org
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to