Results 271 comments of Thomas de Zeeuw

This depends on https://github.com/rust-lang/rust/issues/76923.

It's actually not UB, but it's unsound. Mio doesn't read the buffer nor does it write invalid (`MaybeUninit::uninit`) bytes to the buffers, so we don't trigger any UB. However we...

> @Thomasdezeeuw would mio be interested in building on top of socket2, or would it make more sense to directly call the correct libc functions? No we decided that Mio...

No that won't work on Windows. We need to go through `try_io` on Windows to ensure Mio state is correct, otherwise it can't guarantee events. See https://github.com/tokio-rs/mio/blob/c6f39d6ddba12b32793453dfe65a74104445f68d/src/sys/windows/mod.rs#L82-L97

However we did recently add the `try_io` method to most types we have, e.g. https://docs.rs/mio/0.8.3/mio/net/struct.TcpStream.html#method.try_io.

@sfc-gh-dszmolka I think this issue is also fixed, however not 100% sure (I lost the reproduction code). In any case thanks for the work @sfc-gh-ext-simba-lb!

@sfc-gh-dszmolka I can confirm that the tree fixes this issue. Thanks @sfc-gh-ext-simba-lb!

@sfc-gh-dszmolka I can confirm that the tree fixes this issue. Thanks @sfc-gh-ext-simba-lb!