[m-rev.] Trivial diff: fix hlc.par segfaults

Ralph Becket rafe at cs.mu.OZ.AU
Fri Nov 5 10:30:38 AEDT 2004


Estimated hours taken: 32
Branches: main

NEWS:

runtime/mercury_wrapper.c:
	Remove an earlier simplification that has since caused hlc.par.gc
	grades to fail.  Fergus had done some work on making non-hlc.gc
	grades independent of the Mercury engine code.  Since then, 
	however, other such dependencies have been introduced and Fergus'
	change meant that the Mercury engine was not initialised in
	these cases, which caused hlc.par.gc programs, for instance, to
	immediately segfault.


Index: NEWS
===================================================================
RCS file: /home/mercury1/repository/mercury/NEWS,v
retrieving revision 1.344
diff -u -r1.344 NEWS
--- NEWS	12 Oct 2004 06:55:41 -0000	1.344
+++ NEWS	4 Nov 2004 23:29:21 -0000
@@ -267,6 +267,11 @@
 
 Changes to the Mercury compiler:
 
+* Due to personnel changes and semantic problems in the design of
+  POSIX threads and problems in the implementations thereof that we have tried,
+  we cannot guarantee that we will be able to fix low-level concurrency bugs in
+  .par grades.
+
 * We have added optional support for a new type-accurate garbage collector
   as an alternative to using the Boehm et al conservative collector.
 
Index: runtime/mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.136
diff -u -r1.136 mercury_wrapper.c
--- runtime/mercury_wrapper.c	16 Aug 2004 03:51:10 -0000	1.136
+++ runtime/mercury_wrapper.c	4 Nov 2004 04:05:34 -0000
@@ -505,7 +505,17 @@
  	MR_init_thread_stuff();
 #endif
 
-#if defined(MR_HIGHLEVEL_CODE) && defined(MR_CONSERVATIVE_GC)
+	/*
+	** XXX The condition here used to be 
+	** #if defined(MR_HIGHLEVEL_CODE) && defined(MR_CONSERVATIVE_GC)
+	** and was part of a change by Fergus to remove an unnecessary
+	** dependency on the complicated Mercury engine code.  Unfortunately
+	** this is no longer the case because other such dependencies have
+	** since crept in.  Using the original condition would cause hlc.par
+	** programs to immediately SEGFAULT via reference to an uninitialised
+	** Mercury engine.
+	*/
+#if 0
 	MR_init_memory();
   #ifdef MR_USE_TRAIL
 	/* initialize the trail */
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list