Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <200011282040.eASKeqO21079@ahmlir2.mail.eds.com> From: "Kelley Cook" To: "cygwin Mailing List" , "Christopher Faylor" Date: Tue, 28 Nov 2000 15:40:40 -0500 Reply-To: "Kelley Cook" X-Mailer: PMMail 2000 Standard (2.10.2010) For Windows 2000 (5.0.2195;1) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] Problems with Cygwin mmap/munmap (mmap.cc) [correctly formatted] 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 * 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 AT sourceware DOT cygnus DOT com