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 637561 - Crash when using G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
Crash when using G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
2.26.x
Other Linux
: Normal major
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-12-19 12:22 UTC by Michael Kuhn
Modified: 2011-04-15 10:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix crash (1.08 KB, patch)
2010-12-22 18:38 UTC, Michael Kuhn
none Details | Review

Description Michael Kuhn 2010-12-19 12:22:43 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.
Comment 1 Michael Kuhn 2010-12-22 18:38:34 UTC
Created attachment 176890 [details] [review]
Fix crash

I am attaching a patch that fixes the crash.
Comment 2 David Zeuthen (not reading bugmail) 2011-04-15 10:07:55 UTC
Committed, thanks.

http://git.gnome.org/browse/glib/commit/?id=2553511f4eaf4af8e48f21f4a3a0ac7c58defc8a

Sorry for being slow about this.