summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/hurd.scm3
-rw-r--r--gnu/packages/patches/hurd-crash-x86_64.patch30
3 files changed, 33 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 1da66a2ce63..9a0e7fd7520 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1603,6 +1603,7 @@ dist_patch_DATA = \
%D%/packages/patches/hubbub-sort-entities.patch \
%D%/packages/patches/hueplusplus-mbedtls.patch \
%D%/packages/patches/hugs-fix-build.patch \
+ %D%/packages/patches/hurd-crash-x86_64.patch \
%D%/packages/patches/hurd-refcounts-assert.patch \
%D%/packages/patches/hurd-rumpdisk-no-hd.patch \
%D%/packages/patches/hurd-startup.patch \
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 31b903c5faa..08cc4f1ae4b 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -337,7 +337,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-refcounts-assert.patch"
+ (patches (search-patches "hurd-crash-x86_64.patch"
+ "hurd-refcounts-assert.patch"
"hurd-rumpdisk-no-hd.patch"
"hurd-startup.patch"
"hurd-streamio-select.patch"
diff --git a/gnu/packages/patches/hurd-crash-x86_64.patch b/gnu/packages/patches/hurd-crash-x86_64.patch
new file mode 100644
index 00000000000..93c164d8d8e
--- /dev/null
+++ b/gnu/packages/patches/hurd-crash-x86_64.patch
@@ -0,0 +1,30 @@
+From c809367cb503830346bfb1d1fd927c09d3f3cb16 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Mon, 16 Feb 2026 00:32:00 +0100
+Subject: crash: Fix hang on x86_64 core generation
+
+The produced core file still make gdb crash, but at least crash doen't
+hang.
+---
+ exec/elfcore.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/exec/elfcore.c b/exec/elfcore.c
+index 8c85b13b..a2360965 100644
+--- a/exec/elfcore.c
++++ b/exec/elfcore.c
+@@ -97,6 +97,11 @@ fetch_thread_fpregset (thread_t thread, prfpregset_t *fpregs)
+ struct i386_float_state st;
+ mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
+
++ if (!*fpregs)
++ /* FIXME: having a pointer here is bogus actually, prfpregset_t should be a
++ struct, not a pointer, like on i386. This needs to be fixed in glibc
++ etc. */
++ return;
+ memset (*fpregs, 0, sizeof (**fpregs));
+
+ err = thread_get_state (thread, i386_FLOAT_STATE,
+--
+cgit v1.2.3
+