Skip to content
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

Cargo run does not display segmentation fault information #3891

Closed
isaacg1 opened this issue Apr 1, 2017 · 1 comment
Closed

Cargo run does not display segmentation fault information #3891

isaacg1 opened this issue Apr 1, 2017 · 1 comment

Comments

@isaacg1
Copy link

isaacg1 commented Apr 1, 2017

With the following program, which causes a segmentation fault by allocating too much on the stack:

fn main() {
    println!("Hello world");
    let memo = [[[0; 255]; 255]; 255];
}

Running cargo build followed by executing the binary prints: Segmentation fault (core dumped).
In contrast, running cargo run gives no textual indication of the failure. The output displayed is:

    Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `./three`

This is using either of cargo 0.16.0 and 0.15.0 on Ubuntu Linux 14.04

@alexcrichton
Copy link
Member

Thanks for the report! Cargo just calls exec, however, on the binary ./three. In that sense it's up to your shell to report segfault information, but this is likely being swallowed by rustup, so I'm going to close in favor of that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants