diff --git a/rust-version b/rust-version index 48cc89b109..4fbaee9dcb 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -304b7f801bab31233680879ca4fb6eb294706a59 +a9fb00bfa4b3038c855b2097b54e05e8c198c183 diff --git a/src/shims/unix/mem.rs b/src/shims/unix/mem.rs index de5a5d0759..33ed0e2698 100644 --- a/src/shims/unix/mem.rs +++ b/src/shims/unix/mem.rs @@ -42,10 +42,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let map_shared = this.eval_libc_i32("MAP_SHARED"); let map_fixed = this.eval_libc_i32("MAP_FIXED"); - // This is a horrible hack, but on MacOS and Solaris the guard page mechanism uses mmap + // This is a horrible hack, but on MacOS and Solarish the guard page mechanism uses mmap // in a way we do not support. We just give it the return value it expects. if this.frame_in_std() - && matches!(&*this.tcx.sess.target.os, "macos" | "solaris") + && matches!(&*this.tcx.sess.target.os, "macos" | "solaris" | "illumos") && (flags & map_fixed) != 0 { return Ok(Scalar::from_maybe_pointer(Pointer::from_addr_invalid(addr), this)); diff --git a/tests/fail/intrinsics/simd-div-by-zero.rs b/tests/fail/intrinsics/simd-div-by-zero.rs index ba474332b8..57a9b66d8e 100644 --- a/tests/fail/intrinsics/simd-div-by-zero.rs +++ b/tests/fail/intrinsics/simd-div-by-zero.rs @@ -4,12 +4,12 @@ use std::intrinsics::simd::simd_div; #[repr(simd)] #[allow(non_camel_case_types)] -struct i32x2(i32, i32); +struct i32x2([i32; 2]); fn main() { unsafe { - let x = i32x2(1, 1); - let y = i32x2(1, 0); + let x = i32x2([1, 1]); + let y = i32x2([1, 0]); simd_div(x, y); //~ERROR: Undefined Behavior: dividing by zero } } diff --git a/tests/fail/intrinsics/simd-div-overflow.rs b/tests/fail/intrinsics/simd-div-overflow.rs index d01e41de0e..8ffc266982 100644 --- a/tests/fail/intrinsics/simd-div-overflow.rs +++ b/tests/fail/intrinsics/simd-div-overflow.rs @@ -4,12 +4,12 @@ use std::intrinsics::simd::simd_div; #[repr(simd)] #[allow(non_camel_case_types)] -struct i32x2(i32, i32); +struct i32x2([i32; 2]); fn main() { unsafe { - let x = i32x2(1, i32::MIN); - let y = i32x2(1, -1); + let x = i32x2([1, i32::MIN]); + let y = i32x2([1, -1]); simd_div(x, y); //~ERROR: Undefined Behavior: overflow in signed division } } diff --git a/tests/fail/intrinsics/simd-reduce-invalid-bool.rs b/tests/fail/intrinsics/simd-reduce-invalid-bool.rs index a194f0dd18..ea0f908d99 100644 --- a/tests/fail/intrinsics/simd-reduce-invalid-bool.rs +++ b/tests/fail/intrinsics/simd-reduce-invalid-bool.rs @@ -4,11 +4,11 @@ use std::intrinsics::simd::simd_reduce_any; #[repr(simd)] #[allow(non_camel_case_types)] -struct i32x2(i32, i32); +struct i32x2([i32; 2]); fn main() { unsafe { - let x = i32x2(0, 1); + let x = i32x2([0, 1]); simd_reduce_any(x); //~ERROR: must be all-0-bits or all-1-bits } } diff --git a/tests/fail/intrinsics/simd-rem-by-zero.rs b/tests/fail/intrinsics/simd-rem-by-zero.rs index cd1e4b8162..21c9520efc 100644 --- a/tests/fail/intrinsics/simd-rem-by-zero.rs +++ b/tests/fail/intrinsics/simd-rem-by-zero.rs @@ -4,12 +4,12 @@ use std::intrinsics::simd::simd_rem; #[repr(simd)] #[allow(non_camel_case_types)] -struct i32x2(i32, i32); +struct i32x2([i32; 2]); fn main() { unsafe { - let x = i32x2(1, 1); - let y = i32x2(1, 0); + let x = i32x2([1, 1]); + let y = i32x2([1, 0]); simd_rem(x, y); //~ERROR: Undefined Behavior: calculating the remainder with a divisor of zero } } diff --git a/tests/fail/intrinsics/simd-select-bitmask-invalid.rs b/tests/fail/intrinsics/simd-select-bitmask-invalid.rs index 96802fae49..409098ac3b 100644 --- a/tests/fail/intrinsics/simd-select-bitmask-invalid.rs +++ b/tests/fail/intrinsics/simd-select-bitmask-invalid.rs @@ -5,11 +5,11 @@ use std::intrinsics::simd::simd_select_bitmask; #[repr(simd)] #[allow(non_camel_case_types)] #[derive(Copy, Clone)] -struct i32x2(i32, i32); +struct i32x2([i32; 2]); fn main() { unsafe { - let x = i32x2(0, 1); + let x = i32x2([0, 1]); simd_select_bitmask(0b11111111u8, x, x); //~ERROR: bitmask less than 8 bits long must be filled with 0s for the remaining bits } } diff --git a/tests/fail/intrinsics/simd-select-invalid-bool.rs b/tests/fail/intrinsics/simd-select-invalid-bool.rs index 388fb2e2a8..a81ce95ada 100644 --- a/tests/fail/intrinsics/simd-select-invalid-bool.rs +++ b/tests/fail/intrinsics/simd-select-invalid-bool.rs @@ -5,11 +5,11 @@ use std::intrinsics::simd::simd_select; #[repr(simd)] #[allow(non_camel_case_types)] #[derive(Copy, Clone)] -struct i32x2(i32, i32); +struct i32x2([i32; 2]); fn main() { unsafe { - let x = i32x2(0, 1); + let x = i32x2([0, 1]); simd_select(x, x, x); //~ERROR: must be all-0-bits or all-1-bits } } diff --git a/tests/fail/intrinsics/simd-shl-too-far.rs b/tests/fail/intrinsics/simd-shl-too-far.rs index 12aa7c10af..ed317254ee 100644 --- a/tests/fail/intrinsics/simd-shl-too-far.rs +++ b/tests/fail/intrinsics/simd-shl-too-far.rs @@ -4,12 +4,12 @@ use std::intrinsics::simd::simd_shl; #[repr(simd)] #[allow(non_camel_case_types)] -struct i32x2(i32, i32); +struct i32x2([i32; 2]); fn main() { unsafe { - let x = i32x2(1, 1); - let y = i32x2(100, 0); + let x = i32x2([1, 1]); + let y = i32x2([100, 0]); simd_shl(x, y); //~ERROR: overflowing shift by 100 in `simd_shl` in lane 0 } } diff --git a/tests/fail/intrinsics/simd-shr-too-far.rs b/tests/fail/intrinsics/simd-shr-too-far.rs index ada7cf408c..5d2ff1b82e 100644 --- a/tests/fail/intrinsics/simd-shr-too-far.rs +++ b/tests/fail/intrinsics/simd-shr-too-far.rs @@ -4,12 +4,12 @@ use std::intrinsics::simd::simd_shr; #[repr(simd)] #[allow(non_camel_case_types)] -struct i32x2(i32, i32); +struct i32x2([i32; 2]); fn main() { unsafe { - let x = i32x2(1, 1); - let y = i32x2(20, 40); + let x = i32x2([1, 1]); + let y = i32x2([20, 40]); simd_shr(x, y); //~ERROR: overflowing shift by 40 in `simd_shr` in lane 1 } } diff --git a/tests/pass/simd-intrinsic-generic-elements.rs b/tests/pass/simd-intrinsic-generic-elements.rs index 4a87f8c3ca..9cf0c2ddef 100644 --- a/tests/pass/simd-intrinsic-generic-elements.rs +++ b/tests/pass/simd-intrinsic-generic-elements.rs @@ -3,22 +3,22 @@ #[repr(simd)] #[derive(Copy, Clone, Debug, PartialEq)] #[allow(non_camel_case_types)] -struct i32x2(i32, i32); +struct i32x2([i32; 2]); #[repr(simd)] #[derive(Copy, Clone, Debug, PartialEq)] #[allow(non_camel_case_types)] -struct i32x4(i32, i32, i32, i32); +struct i32x4([i32; 4]); #[repr(simd)] #[derive(Copy, Clone, Debug, PartialEq)] #[allow(non_camel_case_types)] -struct i32x8(i32, i32, i32, i32, i32, i32, i32, i32); +struct i32x8([i32; 8]); fn main() { - let _x2 = i32x2(20, 21); - let _x4 = i32x4(40, 41, 42, 43); - let _x8 = i32x8(80, 81, 82, 83, 84, 85, 86, 87); + let _x2 = i32x2([20, 21]); + let _x4 = i32x4([40, 41, 42, 43]); + let _x8 = i32x8([80, 81, 82, 83, 84, 85, 86, 87]); - let _y2 = i32x2(120, 121); - let _y4 = i32x4(140, 141, 142, 143); - let _y8 = i32x8(180, 181, 182, 183, 184, 185, 186, 187); + let _y2 = i32x2([120, 121]); + let _y4 = i32x4([140, 141, 142, 143]); + let _y8 = i32x8([180, 181, 182, 183, 184, 185, 186, 187]); }