From 6c9a43f61b5cca8d7d7ddfb25d94ee275f3600b1 Mon Sep 17 00:00:00 2001
From: dtc <dtc>
Date: Thu, 25 Dec 1997 09:33:48 +0000
Subject: [PATCH] Take more care when scavenging the Lisp functions of the
 interrupt handlers, taking care to avoid SIG_DFL, and SIG_IGN which is equal
 to 1 on FreeBSD and looks like a forwarding point which causes trouble.

---
 lisp/gencgc.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/lisp/gencgc.c b/lisp/gencgc.c
index 93c70ce67..4c4a3681b 100644
--- a/lisp/gencgc.c
+++ b/lisp/gencgc.c
@@ -7,7 +7,7 @@
  *
  * Douglas Crosher, 1996, 1997.
  *
- * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gencgc.c,v 1.6 1997/12/03 08:17:02 dtc Exp $
+ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gencgc.c,v 1.7 1997/12/25 09:33:48 dtc Exp $
  * */
 
 #include <stdio.h>
@@ -5248,8 +5248,16 @@ garbage_collect_generation(int generation, int raise)
   }
 
   /* Scavenge all the rest of the roots. */
-  scavenge((lispobj *) interrupt_handlers,
-	   sizeof(interrupt_handlers) / sizeof(lispobj));
+
+  /* Scavenge the Lisp functions of the interrupt handlers, taking
+     care to avoid SIG_DFL, SIG_IGN. */
+  for (i = 0; i < NSIG; i++) {
+    union interrupt_handler handler = interrupt_handlers[i];
+    if ((handler.c != SIG_IGN) && (handler.c != SIG_DFL))
+      scavenge((lispobj *)(interrupt_handlers + i), 1);
+  }
+
+  /* Scavenge the binding stack. */
   scavenge(binding_stack,
 	   (lispobj *)SymbolValue(BINDING_STACK_POINTER) - binding_stack);
 
-- 
GitLab