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

Panic aborts under rust-lld + musl #73451

Closed
alecmocatta opened this issue Jun 17, 2020 · 0 comments · Fixed by #73564
Closed

Panic aborts under rust-lld + musl #73451

alecmocatta opened this issue Jun 17, 2020 · 0 comments · Fixed by #73564
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-bug Category: This is a bug. O-musl Target: The musl libc

Comments

@alecmocatta
Copy link
Contributor

alecmocatta commented Jun 17, 2020

This aborts when built with rust-lld + musl on stable and nightly:

fn main() {
    panic!();
}
$ rustc --target x86_64-unknown-linux-musl main.rs && ./main
thread 'main' panicked at 'explicit panic', main.rs:2:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
$ rustc --target x86_64-unknown-linux-musl -C linker=rust-lld main.rs && ./main
thread 'main' panicked at 'explicit panic', main.rs:2:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)
@alecmocatta alecmocatta added the C-bug Category: This is a bug. label Jun 17, 2020
@jonas-schievink jonas-schievink added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows O-musl Target: The musl libc labels Jun 17, 2020
Manishearth added a commit to Manishearth/rust that referenced this issue Jun 29, 2020
linker: Create GNU_EH_FRAME header by default when producing ELFs

Do it in a centralized way in `link.rs` instead of individual target specs.

The opt-out is `-Clink-arg=(-Wl,)--no-eh-frame-hdr` if necessary.

Fixes rust-lang#73451
cc rust-lang#73483
Manishearth added a commit to Manishearth/rust that referenced this issue Jun 30, 2020
linker: Create GNU_EH_FRAME header by default when producing ELFs

Do it in a centralized way in `link.rs` instead of individual target specs.

The opt-out is `-Clink-arg=(-Wl,)--no-eh-frame-hdr` if necessary.

Fixes rust-lang#73451
cc rust-lang#73483
@bors bors closed this as completed in 1c68bb6 Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-bug Category: This is a bug. O-musl Target: The musl libc
Projects
None yet
2 participants