Skip to content

Segmentation fault when running RUST_BACKTRACE=1 on stripped binary #44379

Closed
@johnthagen

Description

@johnthagen
fn main() {
    panic!();
}
$ cargo run --release
    Finished release [optimized] target(s) in 0.0 secs
     Running `target/release/rust-test`
thread 'main' panicked at 'explicit panic', src/main.rs:2:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
$ strip target/release/rust-test
$ RUST_BACKTRACE=1 ./target/release/rust-test 
thread 'main' panicked at 'explicit panic', src/main.rs:2:4
Segmentation fault: 11

Should this be happening? I'm not surprised stripping would affect the backtrace, but a segmentation fault feels like a bug.

Tested on:

active toolchain
----------------

stable-x86_64-apple-darwin (default)
rustc 1.20.0 (f3d6973f4 2017-08-27)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions