X-Spam-Check-By: sourceware.org
Date: Thu, 13 Jul 2006 13:52:45 -0500
From: Brian Ford <Brian.Ford@flightsafety.com>
Reply-To: cygwin@cygwin.com
To: cygwin@cygwin.com
Subject: Re: 1.5.21s mmap error
In-Reply-To: <Pine.CYG.4.58.0607130933400.1164@PC1163-8460-XP.flightsafety.com>
Message-ID: <Pine.CYG.4.58.0607131315110.3316@PC1163-8460-XP.flightsafety.com>
References: <Pine.CYG.4.58.0607121030410.3792@PC1163-8460-XP.flightsafety.com>   <20060712165900.GQ8759@calimero.vinschen.de>   <Pine.CYG.4.58.0607121318080.2284@PC1163-8460-XP.flightsafety.com>   <20060712202215.GS8759@calimero.vinschen.de>   <Pine.CYG.4.58.0607121536330.3784@PC1163-8460-XP.flightsafety.com>   <20060713103431.GA17383@calimero.vinschen.de>  <Pine.CYG.4.58.0607130933400.1164@PC1163-8460-XP.flightsafety.com>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-73223205-1152816765=:3316"
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

---559023410-73223205-1152816765=:3316
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Thu, 13 Jul 2006, Brian Ford wrote:
> On Thu, 13 Jul 2006, Corinna Vinschen wrote:
> > I added an (hopefully) appropriate patch, which commits a page within a
> > MAP_NORESERVE area when memory in this page is accessed by the
> > application.  If commiting the memory fails, SIGBUS is generated. Please
> > test CVS HEAD or the next developer snapshot from
> > http://cygwin.com/snapshots/
>
> Wow!  Thanks.  Given my limited Windows API knowledge, that sounded
> difficult to accomplish properly.  I'll test it for you shortly.

One problem found.  If the memory is not touched before using it as a
buffer to a read call, the read returns -1 with errno set to ISDIR.  STC
attached.

Thanks again for looking at this.

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...
.


---559023410-73223205-1152816765=:3316
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="mmaptest.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.CYG.4.58.0607131352450.3316@PC1163-8460-XP.flightsafety.com>
Content-Description: 
Content-Disposition: attachment; filename="mmaptest.c"

I2luY2x1ZGUgPHN5cy9tbWFuLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+
DQojaW5jbHVkZSA8c3lzL3N0YXQuaD4NCiNpbmNsdWRlIDxmY250bC5oPg0K
I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8dW5pc3RkLmg+DQojaW5j
bHVkZSA8c3RyaW5nLmg+DQoNCg0KaW50DQptYWluKGludCBhcmdjLCBjaGFy
ICogYXJndltdKQ0Kew0KICAgIGludCAgIHZpcnRfc2l6ZSwgZmQ7DQogICAg
dm9pZCAqYWRkcjsNCg0KICAgIGFkZHIgICAgICA9IE5VTEw7DQogICAgdmly
dF9zaXplID0gMHgxODAwMDAwMDsNCiAgICBhZGRyID0gbW1hcChhZGRyLCB2
aXJ0X3NpemUsIChQUk9UX1JFQUR8UFJPVF9XUklURSksDQoJCShNQVBfTk9S
RVNFUlZFfE1BUF9QUklWQVRFfE1BUF9BTk9OKSwgLTEsIDApOw0KICAgIGlm
IChhZGRyID09IE1BUF9GQUlMRUQpDQogICAgew0KCXBlcnJvcigibWFwcGlu
ZyBWTSBzY3JhdGNoIHNwYWNlIik7DQoJcmV0dXJuIC0xOw0KICAgIH0NCg0K
ICAgIGZkID0gb3BlbigiL3Byb2Mvc2VsZi9leGUiLCBPX1JET05MWSk7DQog
ICAgaWYgKGZkIDwgMCkNCiAgICB7DQoJcGVycm9yKCJvcGVuIHNlbGYiKTsN
CglyZXR1cm4gLTE7DQogICAgfQ0KDQojaWZkZWYgUFJFX1RPVUNIDQogICAg
bWVtc2V0KGFkZHIsIC0xLCBzeXNjb25mKF9TQ19QQUdFU0laRSkpOw0KI2Vu
ZGlmDQoNCiAgICBpZiAocmVhZChmZCwgYWRkciwgc3lzY29uZihfU0NfUEFH
RVNJWkUpKSA8IDApDQogICAgew0KCXBlcnJvcigicmVhZCIpOw0KCWNsb3Nl
KGZkKTsNCglyZXR1cm4gLTE7DQogICAgfQ0KDQogICAgY2xvc2UoZmQpOw0K
DQogICAgcmV0dXJuIDA7DQp9DQo=


---559023410-73223205-1152816765=:3316
Content-Type: text/plain; charset=us-ascii

--
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/
---559023410-73223205-1152816765=:3316--
