The "validate" function tries to write data to a pipe from a pointer of unknown validity.
Unfortunately, the function tries to convert the possibly-invalid pointer to a slice, this is unsound and with recent rustc leads to the testsuite panicing
thread 'addr_validate::test::failed_validate' panicked at library/core/src/panicking.rs:220:5:
unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`
In Debian I fixed this by using libc::write directly instead of nix::unistd::write
Related to https://github.com/tikv/pprof-rs/issues/232
The "validate" function tries to write data to a pipe from a pointer of unknown validity.
Unfortunately, the function tries to convert the possibly-invalid pointer to a slice, this is unsound and with recent rustc leads to the testsuite panicing
In Debian I fixed this by using libc::write directly instead of nix::unistd::write
https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/pprof/debian/patches/use-libc-write-for-validation.patch