Skip to content
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

Resource flag is larger than necessary #1184

Closed
nikomatsakis opened this issue Nov 17, 2011 · 1 comment
Closed

Resource flag is larger than necessary #1184

nikomatsakis opened this issue Nov 17, 2011 · 1 comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@nikomatsakis
Copy link
Contributor

Currently resources have a flag of size "int", meaning 32 or 64 bits. This is pretty large for a 1-bit flag. Ideally, it would be a single bit and then allow the alignment code to ensure that the contents of the resource are properly aligned. After the port to x86_64 is running smoothly this would be a good thing to tackle.

@nikomatsakis
Copy link
Contributor Author

I've gone ahead and tagged the places in the code that would need to change with "FIXME #1884"

nikomatsakis added a commit to nikomatsakis/rust that referenced this issue Nov 17, 2011
bjorn3 added a commit to bjorn3/rust that referenced this issue Jul 7, 2021
This has a fix for a miscompilation on AArch64

cc rust-lang#1184
coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
Since most intrinsics are safe it likely makes sense to explicitly
document why there are a few intrinsics that are not safe. These
intrinsics are all unsafe for the same reason, which is that they're
dealing with a raw pointer that must be valid to load/store memory to.
Note that the are no alignment requirements on any of these intrinsics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants