MyGit

tokio-1.16.0

tokio-rs/tokio

版本发布时间: 2022-01-28 07:24:34

tokio-rs/tokio最新发布版本:tokio-1.40.0(2024-08-30 16:04:47)

Fixes a soundness bug in io::Take (#4428). The unsoundness is exposed when leaking memory in the given AsyncRead implementation and then overwriting the supplied buffer:

impl AsyncRead for Buggy {
    fn poll_read(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &mut ReadBuf<'_>
    ) -> Poll<Result<()>> {
      let new_buf = vec![0; 5].leak();
      *buf = ReadBuf::new(new_buf);
      buf.put_slice(b"hello");
      Poll::Ready(Ok(()))
    }
}

Also, this release includes improvements to the multi-threaded scheduler that can increase throughput by up to 20% in some cases (#4383).

Fixed

Added

Unstable

The following changes only apply when building with --cfg tokio_unstable

相关地址:原始地址 下载(tar) 下载(zip)

查看:2022-01-28发行的版本