-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
miri reports ub when panicing inside #[start] function #97049
Comments
I think Miri is correct here. I'm pretty sure But the opening comment does say
Though it's hard to tell if that is normative or correct, being that is an unstable feature and that was 7 years ago. |
This feature is incredibly poorly documented, and because of that, I think most people end up using platform-specific linker things to get the same result, which leads to less interest in the feature, which means there's less effort to document it, and it's a horrible cycle. |
Libstd's |
It is my understanding that a panic "leaving" the top of the Rust-controlled stack is UB, and that is the check that Miri is implementing here. Maybe we should add this as a testcase. :D |
Miri is correct here, this is UB. |
I tried this code:
miri reports:
which does not happen when I just
panic!()
without a#[start]
fnmiri 0.1.0 (3b8b6aa 2022-05-06)
The text was updated successfully, but these errors were encountered: