[m-rev.] diff: protect MR_zone_redzone access with MR_CHECK_OVERFLOW_VIA_MPROTECT

Peter Ross pro at missioncriticalit.com
Mon Jan 11 18:08:16 AEDT 2010


Hi,


===================================================================


runtime/mercury_memory_zones.c:
	Protect access of MR_zone_redzone assertion with
	MR_CHECK_OVERFLOW_VIA_MPROTECT.
	MR_zone_redzone is only defined when MR_CHECK_OVERFLOW_VIA_MPROTECT is
	defined


Index: runtime/mercury_memory_zones.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_memory_zones.c,v
retrieving revision 1.33
diff -u -r1.33 mercury_memory_zones.c
--- runtime/mercury_memory_zones.c	7 Aug 2008 01:16:19 -0000	1.33
+++ runtime/mercury_memory_zones.c	11 Jan 2010 07:06:09 -0000
@@ -708,7 +708,10 @@
         - MR_stack_margin_size;
 
     assert((MR_Word *) zone->MR_zone_extend_threshold > zone->MR_zone_min);
+
+  #ifdef MR_CHECK_OVERFLOW_VIA_MPROTECT
     assert((MR_Word *) zone->MR_zone_extend_threshold < zone->MR_zone_redzone);
+  #endif
 #endif
 }
 

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list