GNOME Bugzilla – Bug 709651
Double free when running tests
Last modified: 2013-11-01 22:42:51 UTC
We encountered a double free segfault when running tests of lp:mediascanner, and it turned that it's because of calling unload_plugin multiple times (after each test). The stacktrace can be seen here: Program received signal SIGABRT, Aborted. __libc_do_syscall () at ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:44 44 ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file or directory. (gdb) bt
+ Trace 232588
And this patch seems to fix the issue: --- grilo.org/libs/net/grl-net-mock.c 2013-09-18 01:18:10 +0000 +++ grilo/libs/net/grl-net-mock.c 2013-10-08 13:57:12 +0000 @@ -256,14 +256,17 @@ { if (config) { g_key_file_unref (config); + config = NULL; } if (base_path) { g_free (base_path); + base_path = NULL; } if (ignored_parameters) { g_regex_unref (ignored_parameters); + ignored_parameters = NULL; } }
Created attachment 258480 [details] [review] net: mockup requester should be initialized/finalized once The mockup requester is shared among all GrlNet instances. So it should be initialized just once, and finalized also once, when no instance require it.
commit d6d53aa07af55ff5c348f6c71eec17d403289786 Author: Juan A. Suarez Romero <jasuarez@igalia.com> Date: Tue Oct 29 18:36:42 2013 +0000 net: mockup requester should be initialized/finalized once The mockup requester is shared among all GrlNet instances. So it should be initialized just once, and finalized also once, when no instance require it. https://bugzilla.gnome.org/show_bug.cgi?id=709651 libs/net/grl-net-mock.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-)