Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAVX stream intrinsics signatures are incorrect, maybe unsound #575
Comments
gnzlbg
changed the title
_mm256_stream_si256 signature incorrect, maybe unsound
AVX stream intrinsic signatures are incorrect, maybe unsound
Oct 3, 2018
gnzlbg
changed the title
AVX stream intrinsic signatures are incorrect, maybe unsound
AVX stream intrinsics signatures are incorrect, maybe unsound
Oct 3, 2018
gnzlbg
added a commit
to gnzlbg/stdsimd
that referenced
this issue
Oct 3, 2018
This comment has been minimized.
This comment has been minimized.
|
Oh dear sounds bad! It may be the case though we can fix this without practical breakage. Want to send a PR and we can crater? |
This comment has been minimized.
This comment has been minimized.
|
Will do. |
gnzlbg
added a commit
to gnzlbg/stdsimd
that referenced
this issue
Oct 5, 2018
gnzlbg
referenced this issue
Oct 5, 2018
Merged
[breaking change] fixes unsoundness in avx non-temporal store APIs. #576
alexcrichton
closed this
in
#576
Nov 2, 2018
alexcrichton
added a commit
that referenced
this issue
Nov 2, 2018
This comment has been minimized.
This comment has been minimized.
|
Notice that However, it could lead to people using |
This comment has been minimized.
This comment has been minimized.
|
Yes, we should just have had a single pointer type :/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gnzlbg commentedOct 3, 2018
•
edited
In the intel intrinsics guide, the signature is:
but in Rust the signature is:
Note that the
mem_addrpointer isconstin Rust, but not in C. Since the only purpose of this function is to write through this pointer, it is probably unsound for it to take aconstpointer.EDIT:
_mm256_stream_pdand_mm256_stream_psalso have this same issue. The SSE_mm_stream_ps,_mm_stream_pd, and_mm_stream_piintrinsics correctly use*muthere.A tangential bug is that the intrinsic verification failed hard here, since the C intrinsics do not use
constpointers, it would have been safer to require these intrinsics to usemutpointers.