-
Notifications
You must be signed in to change notification settings - Fork 488
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
Clarify whether inline assembly nomem
implies nostack
#1350
Comments
This might be fine, but it's currently unclear so we probably shouldn't. See rust-lang/reference#1350 for details.
This might be fine, but it's currently unclear so we probably shouldn't. See rust-lang/reference#1350 for details.
This might be fine, but it's currently unclear so we probably shouldn't. See rust-lang/reference#1350 for details.
I think this code would not be UB.
(source, emphasis mine) |
@Freax13 Thanks, I must have missed that. |
Location: https://doc.rust-lang.org/nightly/reference/inline-assembly.html#options
i.e. is the following UB:
This code obviously does write to memory, but the reference only talks about global variables for
nomem
, which make me think this probably fine? It would be nice to clarify whethernomem
inline assembly is allowed to access to stack at all.The text was updated successfully, but these errors were encountered: