X-Spam-Check-By: sourceware.org Date: Thu, 13 Jul 2006 13:52:45 -0500 From: Brian Ford Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: Re: 1.5.21s mmap error In-Reply-To: Message-ID: References: <20060712165900 DOT GQ8759 AT calimero DOT vinschen DOT de> <20060712202215 DOT GS8759 AT calimero DOT vinschen DOT de> <20060713103431 DOT GA17383 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-73223205-1152816765=:3316" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 ---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: 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--