sapling/eden/mononoke/admin
Zeyi (Rice) Fan ec8fe69d32 tokio-uds-compat: fix UB and make it actually work
Summary:
The previous version had two issues:

1. It's UB to cast uninit away as it may be actually uninitialized.
2. Because of the cast, the buffer was not actually written nor advanced after written to, causing the caller to think nothing was read.

https://docs.rs/tokio/1.11.0/tokio/io/struct.ReadBuf.html

Reviewed By: dtolnay

Differential Revision: D30823808

fbshipit-source-id: d5f67e4c03f1d63f2241421dd35082ee96b5afd8
2021-09-08 18:39:56 -07:00
..
Cargo.toml tokio-uds-compat: fix UB and make it actually work 2021-09-08 18:39:56 -07:00