This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: [PATCH] Problems with Cygwin mmap/munmap (mmap.cc) [correctly formatted]
- To: "cygwin Mailing List" <cygwin at cygwin dot com>, "Christopher Faylor" <cgf at redhat dot com>
- Subject: Re: [PATCH] Problems with Cygwin mmap/munmap (mmap.cc) [correctly formatted]
- From: "Kelley Cook" <Kelley dot Cook at home dot com>
- Date: Tue, 28 Nov 2000 15:40:40 -0500
- Reply-To: "Kelley Cook" <Kelley dot Cook at home dot com>
All right Chris, I'll get to work on the copyright assignments ...
In the meantime, here is my first version of corrections, which just ignores
the problem entirely and is therefore extremely short (one line). Hopefully
short enough to put something in place while the long process of legalness
is sorted out.
It, of course, doesn't fix any of the memory leaks, but it does allows GCC
2.97 to bootstrap by avoiding unmapping memory that might still be used.
Mon Nov 27 21:09:50 2000 Kelley Cook <kelley.cook@home.com>
* mmap.cc (munmap): Check that mmap and munmap length match.
--- cygwin/mmap.cc.orig Mon Nov 27 14:14:17 2000
+++ cygwin/mmap.cc.1 Mon Nov 27 16:09:50 2000
@@ -292,7 +292,7 @@ munmap (caddr_t addr, size_t len)
for (li = 0; li < l->nrecs; ++li)
{
mmap_record rec = l->recs[li];
- if (rec.get_address () == addr)
+ if (rec.get_address () == addr && rec.get_size () == len)
{
int fd = l->fd;
fhandler_disk_file fh_paging_file (NULL);
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com