-
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
book: claim about segfaults happening only in unsafe blocks is not true #30819
Comments
You are correct in your understanding: the text could be tweaked to "you can be sure its cause is somewhere in the sections marked unsafe".
NB. this is an implementation bug in rustc (#16012), i.e. this doesn't happen in a "perfect" Rust compiler (the book is designed to document the language not the details of rustc). |
This is not quite true: http://is.gd/B4wO9H |
@durka it depends what is meant by "cause"; a segfault will only occur if the program executes an |
https://doc.rust-lang.org/nightly/book/unsafe.html
But as far as I understand it, an unsafe block can instead break an invariant that causes a segfault further down the line in safe code.
Also, stack overflows can cause a segfault.
The text was updated successfully, but these errors were encountered: