-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Stack overflow should not abort, it should fail!()
#11011
Comments
Visiting for triage. Most of the bugs listed in the report were closed in favor of other bugs and they point to this one - directly or indirectly. I think it is worth to start discussing this issue and have a clear plan / implementation before 1.0. Nominating. |
Not a 1.0 issue, P-low |
It's fundamentally impossible to do this because it would cause undefined behaviour. Using stack probes, a stack overflow can occur on any write to the stack, and it's completely undefined to unwind from an arbitrary point. It would be impossible to write memory safe low-level code and LLVM also doesn't support an exception model with arbitrary unwinding points like that. With the segmented stack preludes, they are injected during code generation which is too late to have well defined unwinding. The ability for every function to unwind would also result in the impossibility of writing correct low-level code. |
A change like this would be a very large one today; I haven't heard anyone clamoring for this in a while. We have been changing the way that some of this happens; notably, #31333 as such, i'm giving it a close. |
…affate New lint [`redundant_at_rest_pattern`] Closes rust-lang#11011 It's always a great feeling when a new lint triggers on clippy itself 😄 changelog: New lint [`redundant_at_rest_pattern`]
There are a lot of issues surrounding doing this soundly, but this is what we should be doing.
Related issues:
#2361
#3695#3555#9855#9854There is also a large comment in
rust_stack_exhausted
that goes into more details about the trickiness of implementing this correctly.The text was updated successfully, but these errors were encountered: