This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: check_iovec cleanup


Ok, patch withdrawn to avoid arguing over a not very important change.

I've moved the discussion to cygwin-developers because I had a few more
questions.  If anyone feels kind enough to educate me, I'd appreciate it.

On Wed, 26 Jul 2006, Christopher Faylor wrote:
> On Wed, Jul 26, 2006 at 07:15:43PM -0500, Brian Ford wrote:
> >Doesn't it need to check a byte on every system page to be complete
> >(because buffers could start in or span across invalid/protected
> >virtual addresses)?

This is still valid, right?  I know it is a fairly corner case.

> The "underlying Windows system call" can throw an uncaught exception.
> That's why we check first.

I don't understand what you mean by uncaught exception.  AFAICS,
check_iovec was used in readv, writev, sendmsg, and recvmsg.  Again
AFAICS, the only Windows calls that are passed any part of the iovec are
thus ReadFile, WriteFile, WSASendTo, and WSARecvFrom.  To my knowledge,
those functions don't throw exceptions.  Did you mean they would return an
improperly handled/translated error code?  I see WSASendTo/WSARecvFrom
documents WSAEFAULT whose description is appropriate.

> The check is there for a reason.  When I first moved to the exception
> handling method, I took all of the checking out of the iovec stuff.  I
> had to put it back in because it didn't work without it.

Educationally for myself, I wish you remembered exactly what didn't work
because this history doesn't seem to be in CVS, and I don't see anything
that requires it.

Thanks again for the discussion.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]