You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code segfaults when compiled by any version of rustc newer than nightly-2016-08-03 (in my case, I'm using 2016-09-30).
#[test]
fn test_store() {
use simd::u8x16;
let mut array = [0u8; 0x1000];
let ones = u8x16::splat(1);
ones.store(&mut array, 0);
assert_eq!(array[0], 1);
assert_eq!(array[15], 1);
assert_eq!(array[16], 0);
}
Here's some output from gdb that might help:
0x000055555557b23f in simd::common::{{impl}}::store (self=..., array=..., idx=0) at /home/user/.cargo/git/checkouts/simd-a428b8cc9c1d1986/master/src/common.rs:137
137 *(place.as_mut_ptr() as *mut Unalign) = Unalign(self)
I remember that I also ran into issues with this lib around that time. Recent Rust versions resolved the issue for me and also your example seems to work now with rustc 1.14.0-nightly (f09420685 2016-10-20), meaning that there is no segfault and all asserts are passed successfully. Not sure however what change caused the segfaults and how it got resolved.
This code segfaults when compiled by any version of rustc newer than nightly-2016-08-03 (in my case, I'm using 2016-09-30).
Here's some output from gdb that might help:
Assuming GDB can be trusted here, it looks like rust is generating code that dereferences a null pointer.
The text was updated successfully, but these errors were encountered: