RFC: Add realign_stack attribute to rustc by benisxdxd · Pull Request #3594 · ru...
source link: https://github.com/rust-lang/rfcs/pull/3594
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
Contributor
This is useful on ARM as well, where an interrupt handler could be called when the stack isn't 8-byte aligned, which is what the Ideally, if an |
added the T-lang Relevant to the language subteam, which will review and decide on the RFC. label
The motivation section currently quotes the documentation of LLVM's However:
In any case, this would appear to be a requirement irrespective of the calling code, whether from elsewhere in Rust or from a foreign language/compiler? Indeed, it would appear to be a requirement irrespective of the ABI ( Then in the guide level explanation section, an entirely different motivation appears to be given: "cases where your code is called from a thread or a binary compiled with another compiler, that uses different aligmnet and thus lead to a corruption". Admittedly this is far from my area of expertise, but I'm struggling to understand exactly what this means and why LLVM's In particular, what might be emitted by the foreign compiler that causes a problem with the code currently emitted by rustc, and in what circumstances does that happen? |
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK