From 4d82cd90f8919ad620b3dde793566b4ada281b2f Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 12 Apr 2025 13:54:09 +0200 Subject: [PATCH] Add a workaround for UB on arm64 --- redox-rt/src/proc.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/redox-rt/src/proc.rs b/redox-rt/src/proc.rs index c04897fb3a..26b730b861 100644 --- a/redox-rt/src/proc.rs +++ b/redox-rt/src/proc.rs @@ -647,6 +647,10 @@ impl MmapGuard { Ok(()) } + + // Without this inline(never), UB somewhere causes the flags to be set to 0 on arm64. + // FIXME Find the UB and fix it + #[inline(never)] pub unsafe fn map_mut_anywhere<'a>( fd: usize, offset: usize,