-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AVX 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
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? |
Will do. |
gnzlbg
added a commit
to gnzlbg/stdsimd
that referenced
this issue
Oct 5, 2018
alexcrichton
pushed a commit
that referenced
this issue
Nov 2, 2018
Notice that However, it could lead to people using |
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
In the intel intrinsics guide, the signature is:
but in Rust the signature is:
Note that the
mem_addr
pointer isconst
in 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 aconst
pointer.EDIT:
_mm256_stream_pd
and_mm256_stream_ps
also have this same issue. The SSE_mm_stream_ps
,_mm_stream_pd
, and_mm_stream_pi
intrinsics correctly use*mut
here.A tangential bug is that the intrinsic verification failed hard here, since the C intrinsics do not use
const
pointers, it would have been safer to require these intrinsics to usemut
pointers.The text was updated successfully, but these errors were encountered: