Update to rustix 0.26.2. (#3521)
This pulls in a fix for Android, where Android's seccomp policy on older versions is to make `openat2` irrecoverably crash the process, so we have to do a version check up front rather than relying on `ENOSYS` to determine if `openat2` is supported. And it pulls in the fix for the link errors when multiple versions of rsix/rustix are linked in. And it has updates for two crate renamings: rsix has been renamed to rustix, and unsafe-io has been renamed to io-extras.
This commit is contained in:
@@ -176,11 +176,11 @@ impl JitDumpAgent {
|
||||
// To match what some perf examples are doing we keep this `mmap` alive
|
||||
// until this agent goes away.
|
||||
let map_addr = unsafe {
|
||||
let ptr = rsix::io::mmap(
|
||||
let ptr = rustix::io::mmap(
|
||||
ptr::null_mut(),
|
||||
rsix::process::page_size(),
|
||||
rsix::io::ProtFlags::EXEC | rsix::io::ProtFlags::READ,
|
||||
rsix::io::MapFlags::PRIVATE,
|
||||
rustix::process::page_size(),
|
||||
rustix::io::ProtFlags::EXEC | rustix::io::ProtFlags::READ,
|
||||
rustix::io::MapFlags::PRIVATE,
|
||||
&jitdump_file,
|
||||
0,
|
||||
)?;
|
||||
@@ -215,7 +215,7 @@ impl State {
|
||||
// conveniently also uses, but `Instant` doesn't allow us to get access
|
||||
// to nanoseconds as an internal detail, so we calculate the nanoseconds
|
||||
// ourselves here.
|
||||
let ts = rsix::time::clock_gettime(rsix::time::ClockId::Monotonic);
|
||||
let ts = rustix::time::clock_gettime(rustix::time::ClockId::Monotonic);
|
||||
// TODO: What does it mean for either sec or nsec to be negative?
|
||||
(ts.tv_sec * 1_000_000_000 + ts.tv_nsec) as u64
|
||||
}
|
||||
@@ -687,7 +687,7 @@ impl State {
|
||||
impl Drop for State {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
rsix::io::munmap(self.map_addr as *mut _, rsix::process::page_size()).unwrap();
|
||||
rustix::io::munmap(self.map_addr as *mut _, rustix::process::page_size()).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user