compio-rs / compio

A thread-per-core Rust runtime with IOCP/io_uring/polling.
MIT License
420 stars 37 forks source link

Possible unsound in polling driver? #229

Closed Berrysoft closed 5 months ago

Berrysoft commented 7 months ago

In FileStat, ReadAt, WriteAt, ReadVectoredAt, WriteVectoredAt, Sync, and possibly ShutdownSocket, the operation may perform on wrong fd, if the original fd is closed before the op is executed, and another fd is created with the same descriptor immediately.

Not sure if it will affect IOCP, because it seems that the value of handle will not recycle immediately.