================ Comment at: lib/sanitizer_common/sanitizer_posix_libcdep.cc:177 @@ +176,3 @@ + bool res = + !internal_iserror(bytes_written, &write_errno) && bytes_written == size; + internal_close(sock_pair[0]); ---------------- Perhaps assert that write_errno == EFAULT in case of error? http://reviews.llvm.org/D5253