unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob fe6d5e814f130b0b2beeeceef9e644362197e9fd 872 bytes (raw)
name: gnu/packages/patches/hurd-refcounts-assert.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
Upstream-status: Taken from <https://salsa.debian.org/hurd-team/hurd/-/blob/12f30157cc381a1987d5a2464a9c30092241aad1/debian/patches/libports-iterate-refcount.patch>.

libports-iterate-refcount.patch>

http://lists.gnu.org/archive/html/bug-hurd/2016-03/msg00034.html

diff --git a/libports/bucket-iterate.c b/libports/bucket-iterate.c
index b021b99..76dc3f7 100644
--- a/libports/bucket-iterate.c
+++ b/libports/bucket-iterate.c
@@ -58,7 +58,14 @@ _ports_bucket_class_iterate (struct hurd_ihash *ht,
 
       if (class == 0 || pi->class == class)
 	{
-	  refcounts_ref (&pi->refcounts, NULL);
+	  struct references result;
+	  refcounts_unsafe_ref (&pi->refcounts, &result);
+	  if (result.hard == 1 && result.weak == 0)
+	  {
+	    /* This one is on its way out, skip it.  */
+	    refcounts_deref (&pi->refcounts, NULL);
+	    continue;
+	  }
 	  p[n] = pi;
 	  n++;
 	}

debug log:

solving fe6d5e814f ...
found fe6d5e814f in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).