From owner-freebsd-gnome@freebsd.org Thu Sep 1 20:00:38 2016 Return-Path: Delivered-To: freebsd-gnome@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97C03BCB7F0 for ; Thu, 1 Sep 2016 20:00:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 81A099C7 for ; Thu, 1 Sep 2016 20:00:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 80F29BCB7EF; Thu, 1 Sep 2016 20:00:38 +0000 (UTC) Delivered-To: gnome@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 808DCBCB7EE for ; Thu, 1 Sep 2016 20:00:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 570F69C5 for ; Thu, 1 Sep 2016 20:00:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u81K0cWJ032399 for ; Thu, 1 Sep 2016 20:00:38 GMT (envelope-from bugzilla-noreply@freebsd.org) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: gnome@FreeBSD.org Subject: maintainer-approval requested: [Bug 212310] devel/glib20: Error messages with trailing garbage when uninstalling devel/gnome-vfs : [Attachment 174298] glib.diff Date: Thu, 01 Sep 2016 20:00:37 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gnome@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2016 20:00:38 -0000 Tobias Kortkamp has asked gnome@FreeBSD.org for maintainer-approval: Bug 212310: devel/glib20: Error messages with trailing garbage when uninstalling devel/gnome-vfs https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212310 Attachment 174298: glib.diff https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D174298&action=3Dedit --- Comment #1 from Tobias Kortkamp --- Created attachment 174298 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D174298&action= =3Dedit glib.diff The example can be a lot smaller: #include #include #include #include #include int main(int argc, char *argv[]) { setlocale(LC_ALL, ""); const gchar *err =3D g_strerror(ENOENT); printf("%lu: %s\n", strlen(err), err); return 1; } And it's also pretty clear that the problem is in devel/glib20 and in g_strerror. g_strerror is defined in glib/gstrfunc.c line 1254. We see this snippet in there if (!g_get_charset (NULL)) { msg =3D g_locale_to_utf8 (msg, -1, NULL, NULL, &error); if (error) g_print ("%s\n", error->message); } When g_get_charset returns FALSE (which it does when we setlocale(LC_ALL, "= ")) msg is a pointer to a local variable which is put into a GHashTable and returned. Adding=20 else msg =3D g_strdup(buf); fixes the problem or at least prevents printing of garbage values. glib ma= ster has a similar patch for this: else if (msg =3D=3D (const gchar *)buf) msg =3D g_strdup (buf); Also see https://git.gnome.org/browse/glib/commit/glib/gstrfuncs.c?id=3Df87e002313d5= 66dcce 71a9aba040d22ddb5c1e80 I'm attaching a patch against devel/glib20 with a backport of this. Poudriere testport 9.3/amd64 ok