-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
WIP: unsized_locals: refuse to emit incorrect LLVM IR #71417
Conversation
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
(llptr, llextra) | ||
} else { | ||
bug!("store_unsized called with a sized value") | ||
}; | ||
|
||
// FIXME: choose an appropriate alignment, or use dynamic align somehow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like back in #51131 someone noticed this, but wasn't aware that this is a soundness issue.
This would be one way to "fix" #71416: by refusing to generate LLVM IR that we know cannot be correct (because it entirely ignores dynamic alignment). Unfortunately it makes some tests fail, because they use unsized_locals in a way that does not fit the pattern recognized by #71170.
@spastorino this is what I meant on Zulip when I asked for some way to ensure that we actually do not emit bad
alloca
s any more.