Date: Mon, 19 Oct 2020 23:33:28 +0000 (UTC) From: Dima Panov <fluffy@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r552776 - in head/devel/glib20: . files Message-ID: <202010192333.09JNXSuJ090993@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: fluffy Date: Mon Oct 19 23:33:28 2020 New Revision: 552776 URL: https://svnweb.freebsd.org/changeset/ports/552776 Log: devel/glib20: lock getfsent() usage to fix some consumers crashes Add temporary fix while more correct solution is cooking in GNOME repo (see details at https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1707) PR: 250311 Submitted by: sigsys@gmail.com Reviewed by: tijl Added: head/devel/glib20/files/patch-gio_gunixmounts.c (contents, props changed) Modified: head/devel/glib20/Makefile Modified: head/devel/glib20/Makefile ============================================================================== --- head/devel/glib20/Makefile Mon Oct 19 23:06:01 2020 (r552775) +++ head/devel/glib20/Makefile Mon Oct 19 23:33:28 2020 (r552776) @@ -3,6 +3,7 @@ PORTNAME= glib PORTVERSION= 2.66.1 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= devel MASTER_SITES= GNOME Added: head/devel/glib20/files/patch-gio_gunixmounts.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/glib20/files/patch-gio_gunixmounts.c Mon Oct 19 23:33:28 2020 (r552776) @@ -0,0 +1,41 @@ +--- gio/gunixmounts.c.orig 2020-10-01 09:17:53.138733000 -0400 ++++ gio/gunixmounts.c 2020-10-15 13:05:40.628175000 -0400 +@@ -1389,6 +1389,8 @@ + + #elif (defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT)) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H) + ++G_LOCK_DEFINE_STATIC(getfsent); ++ + static GList * + _g_get_unix_mount_points (void) + { +@@ -1400,9 +1402,6 @@ + struct stat sb; + #endif + +- if (!setfsent ()) +- return NULL; +- + return_list = NULL; + + #ifdef HAVE_SYS_SYSCTL_H +@@ -1433,6 +1432,11 @@ + #endif + #endif + ++ G_LOCK (getfsent); ++ if (!setfsent ()) { ++ G_UNLOCK (getfsent); ++ return NULL; ++ } + while ((fstab = getfsent ()) != NULL) + { + gboolean is_read_only = FALSE; +@@ -1468,6 +1472,7 @@ + } + + endfsent (); ++ G_UNLOCK (getfsent); + + return g_list_reverse (return_list); + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010192333.09JNXSuJ090993>