-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rust app crashes with segmentation fault #117334
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
Comments
This is a stack overflow as you're constructing two very large literal on the stack, one that's copied into the vec and one that is copied out. In release mode this is optimised out. Ideally you should see the message
rather than a segmention fault |
@clubby789 makes sense, thanks. |
A stack overflow, especially one written like this, is supposed to hit a stack protector. From the description, it sounds like that is not happening. On Linux, I see this:
It's not clear to me if what you are observing is a bug in the stack protectors on aarch64-apple-darwin. |
We don't enable stack probes on AArch64. |
this looks like a dupe of #107814 and presumably is also fixed. |
Sounds good to me! |
Code compiled with Rust 1.70.0, 1.72.1, 1.73.0 yields code that is failing with segmentation fault in runtime.
I tried this code:
I expected to see this happen:
Instead, this happened:
Code below works (just dropping the size of vec/array)
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: