Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20030926015248.6464.qmail@linuxmail.org> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "peter garrone" To: cygwin AT cygwin DOT com Date: Fri, 26 Sep 2003 09:52:48 +0800 Subject: possible munmap bug X-Originating-Ip: 192.10.200.223 X-Originating-Server: ws5-3.us4.outblaze.com Hi, This was causing my build of gcc to fail. File winsup/cygwin/mmap.cc version 1.86 (and earlier) function munmap when unmapping a 64K record, passes the wrong parameters to fhandler_base::munmap, passing the function parameter address/length instead of a block local version. This patch explains it all. diff -r -p -U 5 cygwin-snapshot-20030924-1/winsup/cygwin/mmap.cc new_cygwin/winsup/cygwin/mmap.cc --- cygwin-snapshot-20030924-1/winsup/cygwin/mmap.cc 2003-09-25 10:40:33.000000000 +1000 +++ new_cygwin/winsup/cygwin/mmap.cc 2003-09-26 11:34:29.984375000 +1000 @@ -679,11 +679,11 @@ munmap (void *addr, size_t len) mmap_record *rec = map_list->get_record (record_idx); if (rec->unmap_pages (u_addr, u_len)) { /* The whole record has been unmapped, so... */ fhandler_base *fh = rec->alloc_fh (); - fh->munmap (rec->get_handle (), (caddr_t)addr, len); + fh->munmap (rec->get_handle (), (caddr_t)u_addr, u_len); rec->free_fh (fh); /* ...delete the record. */ if (map_list->del_record (record_idx--)) { -- ______________________________________________ http://www.linuxmail.org/ Now with e-mail forwarding for only US$5.95/yr Powered by Outblaze -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/