delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/07/13/14:53:01

X-Spam-Check-By: sourceware.org
Date: Thu, 13 Jul 2006 13:52:45 -0500
From: Brian Ford <Brian DOT Ford AT flightsafety DOT com>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT 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 DOT CYG DOT 4 DOT 58 DOT 0607121030410 DOT 3792 AT PC1163-8460-XP DOT flightsafety DOT com> <20060712165900 DOT GQ8759 AT calimero DOT vinschen DOT de> <Pine DOT CYG DOT 4 DOT 58 DOT 0607121318080 DOT 2284 AT PC1163-8460-XP DOT flightsafety DOT com> <20060712202215 DOT GS8759 AT calimero DOT vinschen DOT de> <Pine DOT CYG DOT 4 DOT 58 DOT 0607121536330 DOT 3784 AT PC1163-8460-XP DOT flightsafety DOT com> <20060713103431 DOT GA17383 AT calimero DOT vinschen DOT de> <Pine DOT CYG DOT 4 DOT 58 DOT 0607130933400 DOT 1164 AT PC1163-8460-XP DOT flightsafety DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

---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 DOT CYG DOT 4 DOT 58 DOT 0607131352450 DOT 3316 AT PC1163-8460-XP DOT flightsafety DOT 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--

- Raw text -


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