This is the mail archive of the
mailing list for the Cygwin project.
Re: 1.5.21s mmap error
On Jul 13 13:52, 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
Unfortunately the OS functions don't trigger the exception handler of
the application, so the standard way of doing this doesn't work here.
There's no way around that except for wrapping each and every call to an
OS function manipulating application memory (here: ReadFile) with a test
for ERROR_NOACCESS and trying to resolve this by looking through the
list of mmaps. I'm not sure we really want to do that, certainly not
for 1.5.21. If you need this sort of functionality, switch off
As for EISDIR, that's fixed in CVS. EACCES is returned now.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html