[project @ 2002-09-17 12:20:15 by simonmar]
authorsimonmar <unknown>
Tue, 17 Sep 2002 12:20:15 +0000 (12:20 +0000)
committersimonmar <unknown>
Tue, 17 Sep 2002 12:20:15 +0000 (12:20 +0000)
The GC wasn't properly marking pending signal handlers, which could
lead to "EVACUATED object entered!" errors.  Also, a race occurs if a
signal arrives during GC.  Two fixes:

  (a) mark all pending signal handlers during GC, and
  (b) block signals during GC

MERGE TO STABLE

ghc/rts/Schedule.c

index 56426a5..c0a9c04 100644 (file)
@@ -1,5 +1,5 @@
 /* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.153 2002/08/28 13:02:51 simonmar Exp $
+ * $Id: Schedule.c,v 1.154 2002/09/17 12:20:15 simonmar Exp $
  *
  * (c) The GHC Team, 1998-2000
  *
@@ -2472,6 +2472,9 @@ GetRoots(evac_fn evac)
 #if defined(PAR) || defined(GRAN)
   markSparkQueue(evac);
 #endif
+
+  // mark the signal handlers (signals should be already blocked)
+  markSignalHandlers(evac);
 }
 
 /* -----------------------------------------------------------------------------