[m-rev.] diff: fix minimal model tabling bug

Fergus Henderson fjh at cs.mu.OZ.AU
Tue May 20 18:13:23 AEST 2003


Estimated hours taken: 2
Branches: main

runtime/mercury_context.h:
	Fix a bug in the definition of the MR_load_context() and
	MR_save_context() macros where it was making the stack pointers
	used for minimal model tabling point to the memory_zone struct
	(which records information *about* the memory zone) rather than
	to the space actually intended to hold these stacks.

	This caused tests/dppd/run to fail in a rather obscure way
	in grade asm_fast.gc.mm.

Workspace: /home/ceres/fjh/mercury
Index: runtime/mercury_context.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_context.h,v
retrieving revision 1.23
diff -u -d -r1.23 mercury_context.h
--- runtime/mercury_context.h	18 Mar 2003 16:38:09 -0000	1.23
+++ runtime/mercury_context.h	20 May 2003 08:06:12 -0000
@@ -381,13 +381,13 @@
 				load_context_c->MR_ctxt_pnegstack_zone;	\
 		    MR_gen_stack = (MR_GenStackFrame *)			\
 				MR_ENGINE(MR_eng_context).		\
-					MR_ctxt_genstack_zone;		\
+					MR_ctxt_genstack_zone->min;	\
 		    MR_cut_stack = (MR_CutStackFrame *)			\
 				MR_ENGINE(MR_eng_context).		\
-					MR_ctxt_cutstack_zone;		\
+					MR_ctxt_cutstack_zone->min;	\
 		    MR_pneg_stack = (MR_PNegStackFrame *)		\
 				MR_ENGINE(MR_eng_context).		\
-					MR_ctxt_pnegstack_zone;		\
+					MR_ctxt_pnegstack_zone->min;	\
 	    	  )							\
 	    	)							\
 		MR_set_min_heap_reclamation_point(load_context_c);	\
@@ -436,13 +436,13 @@
 					MR_ctxt_pnegstack_zone;		\
 		    assert(MR_gen_stack == (MR_GenStackFrame *)		\
 				MR_ENGINE(MR_eng_context).		\
-					MR_ctxt_genstack_zone);		\
+					MR_ctxt_genstack_zone->min);	\
 		    assert(MR_cut_stack == (MR_CutStackFrame *)		\
 				MR_ENGINE(MR_eng_context).		\
-					MR_ctxt_cutstack_zone);		\
+					MR_ctxt_cutstack_zone->min);	\
 		    assert(MR_pneg_stack == (MR_PNegStackFrame *)	\
 				MR_ENGINE(MR_eng_context).		\
-					MR_ctxt_pnegstack_zone);	\
+					MR_ctxt_pnegstack_zone->min);	\
 		  )							\
 		)							\
 		MR_save_hp_in_context(save_context_c);			\

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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