guix_mirror_bot pushed a commit to branch hurd-team
in repository guix.

commit c2109e8e8d108c32da06bbc3f3fe4042d4fd6bba
Author: Yelninei <[email protected]>
AuthorDate: Thu Feb 19 13:35:05 2026 +0000

    gnu: hurd: Add patch to prevent hang of crash-dump-core.
    
    * gnu/packages/patches/hurd-crash-x86_64.patch: New patch.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/hurd.scm (hurd): Add patch.
    
    Change-Id: I4a6b3a3385a9890c4a1781092ad1168a7b51e50f
---
 gnu/local.mk                                 |  1 +
 gnu/packages/hurd.scm                        |  3 ++-
 gnu/packages/patches/hurd-crash-x86_64.patch | 30 ++++++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 9705c201f1..5f2184d031 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1604,6 +1604,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 31b903c5fa..08cc4f1ae4 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 0000000000..93c164d8d8
--- /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 <[email protected]>
+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
+

Reply via email to