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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
| | From 1256fb0925c5ff7c94249f53e0fb47d1ec280b3f Mon Sep 17 00:00:00 2001
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 6 Dec 2024 16:18:13 +0100
Subject: [PATCH] Silence GC warnings on the Hurd.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
On 32-bit GNU/Hurd (i586-gnu), libgc emits "Repeated allocation"
warnings that are annoying and interfere with communications between
'guix-daemon' and 'guix authenticate':
<https://issues.guix.gnu.org/73181>.
* libguile/gc.c (scm_gc_no_warnings)[__GNU__]: New procedure.
(scm_init_gc)[__GNU__]: Use it to silence GC warnings.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
---
libguile/gc.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/libguile/gc.c b/libguile/gc.c
index 3cbe43ec5..1ea4abcf8 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -84,6 +84,13 @@ int scm_debug_cells_gc_interval = 0;
garbage collection. */
static SCM scm_protects;
+#if defined __GNU__
+#include <gc.h>
+static void
+scm_gc_no_warnings (char *message, GC_word arg)
+{
+}
+#endif
\f
@@ -616,7 +623,15 @@ scm_init_gc ()
scm_c_hook_add (&scm_after_gc_c_hook, accumulate_gc_timer, NULL, 0);
GC_set_oom_fn (scm_oom_fn);
+#if __GNU__
+ /* XXX: On 32-bit GNU/Hurd (i586-gnu), libgc emits "Repeated allocation"
+ warnings that are annoying and interfere with communications between
+ 'guix-daemon' and 'guix authenticate':
+ <https://issues.guix.gnu.org/73181>. Silence them. */
+ GC_set_warn_proc (scm_gc_no_warnings);
+#else
GC_set_warn_proc (scm_gc_warn_proc);
+#endif
GC_set_start_callback (run_before_gc_c_hook);
#include "gc.x"
--
2.46.0
|