------- Comment #5 from jvdelisle at gcc dot gnu dot org 2009-06-29 04:35 ------- I think this fixes it. Still testing. Will need to get this into 4.4 if this is it. This fix is consistent with fd_set in 4.3 which loops as long as trans > 0. (similar code)
Index: transfer.c =================================================================== --- transfer.c (revision 149044) +++ transfer.c (working copy) @@ -2867,7 +2867,7 @@ sset (stream * s, int c, ssize_t nbyte) { trans = (bytes_left < WRITE_CHUNK) ? bytes_left : WRITE_CHUNK; trans = swrite (s, p, trans); - if (trans < 0) + if (trans <= 0) return trans; bytes_left -= trans; } -- jvdelisle at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail|4.5.0 |4.5.0 4.4.1 Summary|[4.5 Regression] Endless |[4.4, 4.5 Regression] |loop in internal write |Endless loop in internal | |write http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40576