[Mono-list] 'make test' fails in mono/tests with cygwin

Paolo Molaro lupus@debian.org
Thu, 27 Sep 2001 22:44:55 +0200


On 09/27/01 Brian Jepson wrote:
> Thanks!  Is this something I can patch easily, or should I wait for the
> next snapshot (I don't have CVS access)?

Oh, sorry, I forgot to mention I already committed the fix.
The patch is included below or just wait for the next snapshot.

lupus

Index: metadata/rawbuffer.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/rawbuffer.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- metadata/rawbuffer.c	2001/07/31 16:06:17	1.2
+++ metadata/rawbuffer.c	2001/09/27 15:49:54	1.3
@@ -32,8 +32,16 @@
 
 	start = base & ~(PAGESIZE - 1);
 	end = (base + size + PAGESIZE - 1) & ~(PAGESIZE - 1);
-	
+
+	/*
+	 * Apparently on cygwin the mmpa succedes, but not all the
+	 * area is mapped in and we get segfaults later.
+	 */
+#ifdef __CYGWIN__
+	mmap_ptr = (void *) -1;
+#else
 	mmap_ptr = mmap (0, end - start, prot, flags, fd, start);
+#endif
 	if (mmap_ptr == (void *) -1){
 		ptr = g_malloc (size);
 		if (ptr == NULL)
-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better