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 784891 - [PATCH] g_array_append_val() in get_system_session_dirs() never works
[PATCH] g_array_append_val() in get_system_session_dirs() never works
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-13 08:24 UTC by Daniel van Vugt
Modified: 2017-07-17 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
First attempt at a fix (1.03 KB, patch)
2017-07-13 08:38 UTC, Daniel van Vugt
committed Details | Review

Description Daniel van Vugt 2017-07-13 08:24:50 UTC
In https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1704050
we found that using the g_array_append_val() code path in get_system_session_dirs() does not work.

This is because g_array_append_val is appending after a NULL (there are two of them) and so g_strdupv never finds the wayland_search_dir entry.
Comment 1 Daniel van Vugt 2017-07-13 08:26:06 UTC
Patch coming in a minute...
Comment 2 Daniel van Vugt 2017-07-13 08:38:05 UTC
Created attachment 355485 [details] [review]
First attempt at a fix
Comment 3 Ray Strode [halfline] 2017-07-14 14:10:06 UTC
Review of attachment 355485 [details] [review]:

Looks right, but note this bug will only manifest if you're building with --disable-user-display-server and --enable-wayland-support.  is that the configuration you want, it's a little unusual?
Comment 4 Daniel van Vugt 2017-07-17 02:38:08 UTC
In Ubuntu we have distro-patched a similar change that calls g_array_append_val unconditionally. So it's rather important to Ubuntu right now.
Comment 5 Ray Strode [halfline] 2017-07-17 13:56:56 UTC
Thanks pushed, with a different commit message as commit d81a471.