This commit is contained in:
Ralf Jung 2023-05-12 10:07:20 +02:00
parent 154c7a5e91
commit 97d3e4eba6
2 changed files with 3 additions and 1 deletions

View File

@ -5,7 +5,8 @@ fn main() {
unsafe {
let mut vec: Vec<i8> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18];
let idxs = Simd::from_array([9, 3, 0, 17]);
Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked( //~ERROR: pointer to 1 byte starting at offset 9 is out-of-bounds
Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked(
//~^ERROR: pointer to 1 byte starting at offset 9 is out-of-bounds
&mut vec,
Mask::splat(true),
idxs,

View File

@ -2,6 +2,7 @@ error: Undefined Behavior: dereferencing pointer failed: ALLOC has size 9, so po
--> $DIR/simd-scatter.rs:LL:CC
|
LL | / Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked(
LL | |
LL | | &mut vec,
LL | | Mask::splat(true),
LL | | idxs,