diff options
author | Janneke Nieuwenhuizen <janneke@gnu.org> | 2024-11-20 08:54:33 +0100 |
---|---|---|
committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2024-12-03 08:39:01 +0100 |
commit | 12416994273f1fcacba50bfc145311b4a850def6 (patch) | |
tree | 8d98eaaf284e660e00514aaa8fa9e09db9f8bcb8 /gnu/packages | |
parent | 527fc6906d2be5dd3acef702fd522f2ac83cdcbf (diff) | |
download | guix-12416994273f1fcacba50bfc145311b4a850def6.tar.gz guix-12416994273f1fcacba50bfc145311b4a850def6.zip |
gnu: hurd: Add refcounts-assert patch.
See <https://logs.guix.gnu.org/hurd/2024-11-20.log#082237>.
* gnu/packages/patches/hurd-refcounts-assert.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/hurd.scm (hurd): Use it.
Change-Id: I51ee319f1b7e26a7ed0f4e9f69755aa596ea6877
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/hurd.scm | 3 | ||||
-rw-r--r-- | gnu/packages/patches/hurd-refcounts-assert.patch | 26 |
2 files changed, 28 insertions, 1 deletions
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 63249b4ef7..61833219c4 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -316,7 +316,8 @@ Hurd-minimal package which are needed for both glibc and GCC.") (name "hurd") (source (origin (inherit (package-source hurd-headers)) - (patches (search-patches "hurd-rumpdisk-no-hd.patch" + (patches (search-patches "hurd-refcounts-assert.patch" + "hurd-rumpdisk-no-hd.patch" "hurd-startup.patch" "hurd-64bit.patch")))) (version (package-version hurd-headers)) diff --git a/gnu/packages/patches/hurd-refcounts-assert.patch b/gnu/packages/patches/hurd-refcounts-assert.patch new file mode 100644 index 0000000000..fe6d5e814f --- /dev/null +++ b/gnu/packages/patches/hurd-refcounts-assert.patch @@ -0,0 +1,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++; + } |