GNOME Bugzilla – Bug 786528
Please make the output deterministic
Last modified: 2018-01-22 20:06:46 UTC
Created attachment 357999 [details] [review] 0001-gtk-queryimmodules.c-Make-the-output-deterministic.patch Whilst working on the Reproducible Builds effort [0], we noticed that queryimmodules generates non-reproducible output as it iterates over the filesystem without sorting. Patch attached. [0] https://reproducible-builds.org/
Review of attachment 357999 [details] [review]: Thanks for the patch! Only some minor fixes needed ::: gtk/queryimmodules.c @@ +196,3 @@ { const char *dent; + GSList *list = NULL, *iterator = NULL; Not that it matters much, but if you want to sort, using a GList or an array would be better. @@ +208,3 @@ } + g_slist_free (list); You are leaking the duplicated strings here.
Hi Matthias, Thanks for the review. Attaching an updated patch that moves to a GList (doubly-linked) and uses g_list_free_full to free the strdup'd contents of said list.
Created attachment 358384 [details] [review] v2 of 0001-gtk-queryimmodules.c-Make-the-output-deterministic.patch v2
Review of attachment 358384 [details] [review]: With that fix, it looks fine to commit ::: gtk/queryimmodules.c @@ +208,3 @@ } + g_list_free_full (list, g_object_unref); This needs to be g_free - your list contains dup'ed strings
Created attachment 358411 [details] [review] 0001-gtk-queryimmodules.c-Make-the-output-deterministic.patch Updated patch attached.
NB. This patch applies to both the latest GTK2 and GTK3, with only the offset differing. Please apply to both branches. In Debian, these have two separate bugs: https://bugs.debian.org/872729 (GTK2) https://bugs.debian.org/875700 (GTK3)
I just got a mail that this was fix.ed Was this merged under GTK2 or GTK3? :)
only 3, but I've pushed it to 2 now