[project @ 1999-04-27 10:59:29 by sewardj]
[ghc-hetmet.git] / ghc / rts / Schedule.c
index ffad52f..09aeb15 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.18 1999/03/17 13:19:24 simonm Exp $
+ * $Id: Schedule.c,v 1.20 1999/04/27 10:59:31 sewardj Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -515,13 +515,18 @@ threadStackOverflow(StgTSO *tso)
   StgTSO *dest;
 
   if (tso->stack_size >= tso->max_stack_size) {
-#ifdef 0
+#if 0
     /* If we're debugging, just print out the top of the stack */
     printStackChunk(tso->sp, stg_min(tso->stack+tso->stack_size, 
                                     tso->sp+64));
 #endif
+#ifdef INTERPRETER
+    fprintf(stderr, "fatal: stack overflow in Hugs; aborting\n" );
+    exit(1);
+#else
     /* Send this thread the StackOverflow exception */
     raiseAsync(tso, (StgClosure *)&stackOverflow_closure);
+#endif
     return tso;
   }