|
| 1 | +# 1.16.0 (January 27, 2022) |
| 2 | + |
| 3 | +Fixes a soundness bug in `io::Take` ([#4428]). The unsoundness is exposed when |
| 4 | +leaking memory in the given `AsyncRead` implementation and then overwriting the |
| 5 | +supplied buffer: |
| 6 | + |
| 7 | +```rust |
| 8 | +impl AsyncRead for Buggy { |
| 9 | + fn poll_read( |
| 10 | + self: Pin<&mut Self>, |
| 11 | + cx: &mut Context<'_>, |
| 12 | + buf: &mut ReadBuf<'_> |
| 13 | + ) -> Poll<Result<()>> { |
| 14 | + let new_buf = vec![0; 5].leak(); |
| 15 | + *buf = ReadBuf::new(new_buf); |
| 16 | + buf.put_slice(b"hello"); |
| 17 | + Poll::Ready(Ok(())) |
| 18 | + } |
| 19 | +} |
| 20 | +``` |
| 21 | + |
| 22 | +Also, this release includes improvements to the multi-threaded scheduler that |
| 23 | +can increase throughput by up to 20% in some cases ([#4383]). |
| 24 | + |
| 25 | +### Fixed |
| 26 | + |
| 27 | +- io: **soundness** don't expose uninitialized memory when using `io::Take` in edge case ([#4428]) |
| 28 | +- fs: ensure `File::write` results in a `write` syscall when the runtime shuts down ([#4316]) |
| 29 | +- process: drop pipe after child exits in `wait_with_output` ([#4315]) |
| 30 | +- rt: improve error message when spawning a thread fails ([#4398]) |
| 31 | +- rt: reduce false-positive thread wakups in the multi-threaded scheduler ([#4383]) |
| 32 | +- sync: don't inherit `Send` from `parking_lot::*Guard` ([#4359]) |
| 33 | + |
| 34 | +### Added |
| 35 | + |
| 36 | +- net: `TcpSocket::linger()` and `set_linger()` ([#4324]) |
| 37 | +- net: impl `UnwindSafe` for socket types ([#4384]) |
| 38 | +- rt: impl `UnwindSafe` for `JoinHandle` ([#4418]) |
| 39 | +- sync: `watch::Receiver::has_changed()` ([#4342]) |
| 40 | +- sync: `oneshot::Receiver::blocking_recv()` ([#4334]) |
| 41 | +- sync: `RwLock` blocking operations ([#4425]) |
| 42 | + |
| 43 | +### Unstable |
| 44 | + |
| 45 | +The following changes only apply when building with `--cfg tokio_unstable` |
| 46 | + |
| 47 | +- rt: **breaking change** overhaul runtime metrics API ([#4373]) |
| 48 | + |
| 49 | +[#4428]: https://github.com/tokio-rs/tokio/pull/4428 |
| 50 | +[#4316]: https://github.com/tokio-rs/tokio/pull/4316 |
| 51 | +[#4315]: https://github.com/tokio-rs/tokio/pull/4315 |
| 52 | +[#4398]: https://github.com/tokio-rs/tokio/pull/4398 |
| 53 | +[#4383]: https://github.com/tokio-rs/tokio/pull/4383 |
| 54 | +[#4359]: https://github.com/tokio-rs/tokio/pull/4359 |
| 55 | +[#4324]: https://github.com/tokio-rs/tokio/pull/4324 |
| 56 | +[#4384]: https://github.com/tokio-rs/tokio/pull/4384 |
| 57 | +[#4418]: https://github.com/tokio-rs/tokio/pull/4418 |
| 58 | +[#4342]: https://github.com/tokio-rs/tokio/pull/4342 |
| 59 | +[#4334]: https://github.com/tokio-rs/tokio/pull/4334 |
| 60 | +[#4425]: https://github.com/tokio-rs/tokio/pull/4425 |
| 61 | +[#4373]: https://github.com/tokio-rs/tokio/pull/4373 |
| 62 | + |
1 | 63 | # 1.15.0 (December 15, 2021)
|
2 | 64 |
|
3 | 65 | ### Fixed
|
|
0 commit comments