[m-dev.] for review: Linux stack overflow fix.

Tyson Dowd trd at cs.mu.OZ.AU
Mon Sep 11 15:26:37 AEDT 2000


Fergus made a few suggestions, which are reflected in this incremental
diff.

diff -u runtime/mercury_memory_handlers.c runtime/mercury_memory_handlers.c
--- runtime/mercury_memory_handlers.c
+++ runtime/mercury_memory_handlers.c
@@ -946,7 +946,7 @@
 #ifndef	MR_LOWLEVEL_DEBUG
 
 	const char *msg =
-		"You can get a stack dump by recompiling in a debugging grade.\n";
+		"This may have been caused by a stack overflow, due to unbounded recursion.\n";
 	write(STDERR, msg, strlen(msg));
 
 #else /* MR_LOWLEVEL_DEBUG */
diff -u runtime/mercury_signal.c runtime/mercury_signal.c
--- runtime/mercury_signal.c
+++ runtime/mercury_signal.c
@@ -92,11 +92,10 @@
 
 	if (need_info) {
 	/*
-	** If we are using sigcontext struct, it means the configuration
-	** tests for SIGINFO have failed in some way (an
-	** incomplete implementation of siginfo perhaps), and so when we
+	** If we are using sigcontext struct, it means we have
+	** configured to not use siginfo, and so when we
 	** request signals, we should not ask for SA_SIGINFO, since our
-	** handler will not be of this type.
+	** handler will not be of the right type.
 	*/
 #if	defined(HAVE_SIGCONTEXT_STRUCT)
 		act.sa_flags = SA_RESTART;
-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list