delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/07/15/17:10:30

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: <1089925820.40f6f2bcf1d88@imp3-q.free.fr>
Date: Thu, 15 Jul 2004 23:10:20 +0200
From: Xavier Joubert <xavier DOT joubert AT free DOT fr>
To: cygwin AT cygwin DOT com
Subject: Re: [BUG] mprotect() on Windows NT 5+
MIME-Version: 1.0
User-Agent: Internet Messaging Program (IMP) 3.2.4
X-Originating-IP: 213.101.233.95

Hello Corinna,


Selon Corinna Vinschen <corinna-cygwin AT cygwin DOT com>:
> The cause is a limitation in newer Windows NT versions, which make sense.
> Well, sort of.  The protection modes PAGE_READWRITE and PAGE_WRITECOPY are
> mutually exlusive, which is enforced in calls to VirtualProtect since W2K.
>
> Since your example uses MAP_PRIVATE, which Cygwin maps to PAGE_WRITECOPY,
> trying to protect with MAP_WRITE, which internally maps to PAGE_READWRTE,
> fails on W2K and later.  I've checked in a fix, so that mprotect tests for
> the original protection mode of the first page in the area, and uses
> READWRITE or WRITECOPY, whichever matches the original protection.

Whow! That's amazing! I didn't expect to get a reply today. Even less a fix
commited to CVS. If all bugs last only 51 minutes in Cygwin, this software will
quickly become perfect!

Thanks _a lot_ Corinna !

I'll try Cygwin snapshot tomorrow and let you know how it goes with the real
stuff.


Xavier

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019