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:
@@ -10,15 +10,15 @@ fn decommit(addr: *mut u8, len: usize, protect: bool) -> Result<()> {
|
||||
// The new mapping will be to the CoW zero page, so this effectively
|
||||
// zeroes the pages.
|
||||
unsafe {
|
||||
rsix::io::mmap_anonymous(
|
||||
rustix::io::mmap_anonymous(
|
||||
addr as _,
|
||||
len,
|
||||
if protect {
|
||||
rsix::io::ProtFlags::empty()
|
||||
rustix::io::ProtFlags::empty()
|
||||
} else {
|
||||
rsix::io::ProtFlags::READ | rsix::io::ProtFlags::WRITE
|
||||
rustix::io::ProtFlags::READ | rustix::io::ProtFlags::WRITE
|
||||
},
|
||||
rsix::io::MapFlags::PRIVATE | rsix::io::MapFlags::FIXED,
|
||||
rustix::io::MapFlags::PRIVATE | rustix::io::MapFlags::FIXED,
|
||||
)
|
||||
.context("mmap failed to remap pages: {}")?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user