[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
54/58: gnu: hurd: Add refcounts-assert patch.
From: |
guix-commits |
Subject: |
54/58: gnu: hurd: Add refcounts-assert patch. |
Date: |
Sun, 24 Nov 2024 02:50:42 -0500 (EST) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit 473ee0bdce15a1b12924885e9740cd0d1b54b6f9
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed Nov 20 08:54:33 2024 +0100
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
---
gnu/local.mk | 1 +
gnu/packages/hurd.scm | 3 ++-
gnu/packages/patches/hurd-refcounts-assert.patch | 26 ++++++++++++++++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 08314ade22..c75345ee93 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1556,6 +1556,7 @@ dist_patch_DATA =
\
%D%/packages/patches/hubbub-sort-entities.patch \
%D%/packages/patches/hueplusplus-mbedtls.patch \
%D%/packages/patches/hurd-64bit.patch \
+ %D%/packages/patches/hurd-refcounts-assert.patch \
%D%/packages/patches/hurd-rumpdisk-no-hd.patch \
%D%/packages/patches/hurd-startup.patch \
%D%/packages/patches/hwloc-1-test-btrfs.patch \
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++;
+ }
- 22/58: gnu: libssh: Fix [cross-]build with gcc-14 for 32bit., (continued)
- 22/58: gnu: libssh: Fix [cross-]build with gcc-14 for 32bit., guix-commits, 2024/11/24
- 21/58: gnu: libedit: Fix [cross-]build with gcc-14 for 32bit., guix-commits, 2024/11/24
- 30/58: gnu: libgpg-error: Support the 64bit Hurd., guix-commits, 2024/11/24
- 36/58: gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337., guix-commits, 2024/11/24
- 40/58: gnu: grub: Fix build for the 64bit Hurd., guix-commits, 2024/11/24
- 48/58: gnu: Add gdb-15.2, with support for the 64bit Hurd., guix-commits, 2024/11/24
- 38/58: gnu: hurd: Build fixes for the 64bit Hurd., guix-commits, 2024/11/24
- 51/58: system: examples: Add devel-hurd64.tmpl., guix-commits, 2024/11/24
- 52/58: gnu: Use gcc-14, gcc-toolchain-14 on the 64bit Hurd., guix-commits, 2024/11/24
- 55/58: gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd., guix-commits, 2024/11/24
- 54/58: gnu: hurd: Add refcounts-assert patch.,
guix-commits <=
- 35/58: gnu: netdde: Support the 64bit Hurd., guix-commits, 2024/11/24
- 43/58: gnu: commencement: gnumach-headers-boot0: Update to 1.8+git20240714., guix-commits, 2024/11/24
- 53/58: gnu: commencement: kernel-headers-boot0: Support the 64bit Hurd., guix-commits, 2024/11/24
- 34/58: gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df., guix-commits, 2024/11/24
- 37/58: gnu: rumpkernel: Support the 64bit Hurd., guix-commits, 2024/11/24
- 42/58: gnu: m4: Fix build for the 64bit Hurd., guix-commits, 2024/11/24
- 56/58: gnu: commencement: libstdc++-boot0: Support the 64bit Hurd., guix-commits, 2024/11/24
- 31/58: gnu: openssl-3.0: Support the 64bit Hurd., guix-commits, 2024/11/24