delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <01fe01c089a6$09101800$0200a8c0@voyager> |
From: | "Trevor Forbes" <trevorforbes AT ozemail DOT com DOT au> |
To: | <cygwin AT cygwin DOT com> |
References: | <20010128161343 DOT A20664 AT redhat DOT com> <018301c08986$a4100470$0200a8c0 AT voyager> <20010128190458 DOT A26380 AT redhat DOT com> <20010128194208 DOT A27804 AT redhat DOT com> |
Subject: | Re: changes in 2001-01-27 snapshot -- test suite question |
Date: | Mon, 29 Jan 2001 13:16:15 +0930 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook Express 5.50.4133.2400 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
I have reduced the /dev/zero test case (devzero.c) down to the area of interest. Not being an expert, but mmap seems to be returning an address which is out of bounds. I am still having problems debugging the cygwin1.dll so this is as far as I can go at the moment. I hope this is of some use. Regards Trevor ------------------------devzero.c #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <fcntl.h> #include <sys/mman.h> main() { int fd, r, w, l; char buf[1024]; char *v; fd = open("/dev/zero", O_RDWR); v = (char *)mmap(0, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); if (v == (char *)-1) { fprintf(stderr, "mmap r/w /dev/zero failed\n"); perror("The error was"); exit(1); } for (r=0; r<65536; r++) if (v[r] != 0) { fprintf(stderr, "mmap'd r/w /dev/zero has byte %d at offset %d\n", v[r], r); exit(1); } munmap(v, 65536); close(fd); exit(0); } -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |