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 729730 - GDBusMessage: Fix segfault if DEBUG_SERIALIZER is enabled
GDBusMessage: Fix segfault if DEBUG_SERIALIZER is enabled
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other Linux
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-05-07 16:09 UTC by Lukasz Skalski
Modified: 2016-11-22 20:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] GDBusMessage: Fix segfault if DEBUG_SERIALIZER is enabled (828 bytes, patch)
2014-05-07 16:11 UTC, Lukasz Skalski
committed Details | Review

Description Lukasz Skalski 2014-05-07 16:09:10 UTC
*** Issue ***

If DEBUG_SERIALIZER (in gio/gdbusmessage.c) is uncommented:

[l.skalski@AMDC2224 tmp]$ gdbus emit -e -o / -s test.test.test
Parsing blob (blob_len = 0x005b bytes)
  0000: 6c 02 01 01  0b 00 00 00  01 00 00 00  3d 00 00 00    l...........=...
  0010: 06 01 73 00  06 00 00 00  3a 31 2e 37  31 34 00 00    ..s.....:1.714..
  0020: 05 01 75 00  01 00 00 00  08 01 67 00  01 73 00 00    ..u.......g..s..
  0030: 07 01 73 00  14 00 00 00  6f 72 67 2e  66 72 65 65    ..s.....org.free
  0040: 64 65 73 6b  74 6f 70 2e  44 42 75 73  00 00 00 00    desktop.DBus....
  0050: 06 00 00 00  3a 31 2e 37  31 34 00                    ....:1.714.

Parsing headers (blob_len = 0x005b bytes)
Segmentation fault (core dumped)

*** Solution ***

This problem is quite old and was introduced by 3e5214c15c2a19b64d74e7142b6cd0d520dddf04 commit, after replacing GDataInputStream and GDataOutputStream by GMemoryBuffer struct). Stream seeking interface (g_seekable_*) should be use only with G*Stream.
Comment 1 Lukasz Skalski 2014-05-07 16:11:43 UTC
Created attachment 276082 [details] [review]
[PATCH] GDBusMessage: Fix segfault if DEBUG_SERIALIZER is enabled
Comment 2 Colin Walters 2016-11-22 19:59:26 UTC
Review of attachment 276082 [details] [review]:

Oops, yes.
Comment 3 Colin Walters 2016-11-22 19:59:28 UTC
Review of attachment 276082 [details] [review]:

Oops, yes.