GNOME Bugzilla – Bug 637561
Crash when using G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
Last modified: 2011-04-15 10:08:04 UTC
When creating a GDBusServer with G_DBUS_SERVER_FLAGS_RUN_IN_THREAD the application crashes when the first client connects. Here's a backtrace: ==5788== Thread 7: ==5788== Invalid write of size 4 ==5788== at 0x56EEBBF: value_lcopy_boolean (gvaluetypes.c:79) ==5788== by 0x56DDA62: g_signal_emit_valist (gsignal.c:2995) ==5788== by 0x56DDF52: g_signal_emit (gsignal.c:3040) ==5788== by 0x5E96CF7: on_run (gdbusserver.c:994) ==5788== by 0x5EA547B: _gio_marshal_BOOLEAN__OBJECT_OBJECT (gio-marshal.c:277) ==5788== by 0x56C6A6D: g_closure_invoke (gclosure.c:766) ==5788== by 0x56DC4D6: signal_emit_unlocked_R (gsignal.c:3252) ==5788== by 0x56DD7DA: g_signal_emit_valist (gsignal.c:2993) ==5788== by 0x56DDF52: g_signal_emit (gsignal.c:3040) ==5788== by 0x5E5707C: g_threaded_socket_service_func (gthreadedsocketservice.c:93) ==5788== by 0x5B7473E: g_thread_pool_thread_proxy (gthreadpool.c:319) ==5788== by 0x5B727E3: g_thread_create_proxy (gthread.c:1897) ==5788== by 0x5077970: start_thread (pthread_create.c:304) ==5788== by 0x660A92C: clone (clone.S:112) ==5788== Address 0x20 is not stack'd, malloc'd or (recently) free'd This is probably due to commit http://git.gnome.org/browse/glib/commit/?id=ee945d8f621609086a8777ca4226cb93308c12e4 which did not change the g_signal_emit() in on_run(). See http://git.gnome.org/browse/glib/tree/gio/gdbusserver.c#n994.
Created attachment 176890 [details] [review] Fix crash I am attaching a patch that fixes the crash.
Committed, thanks. http://git.gnome.org/browse/glib/commit/?id=2553511f4eaf4af8e48f21f4a3a0ac7c58defc8a Sorry for being slow about this.