[m-dev.] for review: fix a bug in collect

Erwan Jahier Erwan.Jahier at irisa.fr
Mon Aug 14 23:37:05 AEST 2000


Many thanks to Fergus that helped me (once again) to fix that one.

--
Estimated hours taken: 2

Fix a bug that was causing a segmentation violation when using
The Morphine collect operator under Linux. 

runtime/mercury_wrapper.c:
	Restore the registers before calling MR_trace_final() in 
        mercury_runtime_terminate() as MR_trace_final() expect them to
        be valid.

Index: runtime/mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.67
diff -u -r1.67 mercury_wrapper.c
--- runtime/mercury_wrapper.c   2000/08/10 10:44:22     1.67
+++ runtime/mercury_wrapper.c   2000/08/14 13:32:00
@@ -1319,6 +1319,12 @@
 
        (*MR_library_finalizer)();
 
+       /*
+       ** Restore the registers before calling MR_trace_final()  
+       ** as MR_trace_final() expect them to be valid.
+       */
+       restore_registers(); 
+
        MR_trace_final();
 
        if (MR_profiling) MR_prof_finish();
--------------------------------------------------------------------------
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