PLEASE TEST: New implementation of blocking socket I/O

Pierre A. Humblet Pierre.Humblet@ieee.org
Wed Mar 31 15:55:00 GMT 2004



Corinna Vinschen wrote:
> 
> On Mar 31 09:55, Pierre A. Humblet wrote:
> > I am hesitant to start sinking time in this. If I understand correctly you
> > are trying to fix a race. They tend to go away while running under gdb.
> 
> The race is gone with this code.  It's no the problem to debug it
> with gdb.
> 
> > In 310663 = write (3, 0x7DE810, 1), it's likely that 310663 is larger
> > than the buffer size. Where can that come from? Can you add a trap?
> 
> There's a chance that the first call to WSAwhatever already returns
> WSAEWOULDBLOCK and ret is uninitialized.  I've applied a fix which
> always set ret to 0 in calls to WSAwhatever.  Does that help?
 
Will try tonight.

Looking at the trace, just after the abnormal return from write there is
593 2762194 [main] cvs 621789 __set_errno: int
__check_invalid_read_ptr_errno(const void*, unsigned int):214 val 14

Is there an explanation for that invalid pointer?
It's the cause of the "Bad address" in
"cvs [update aborted]: error writing to server: Bad address".

Pierre



More information about the Cygwin-developers mailing list