Skip to content

x86_64-unknown-linux-musl binaries SIGSEGV during early initialization #74757

Closed
@nagisa

Description

@nagisa

Minimized reproducer

fn main() {}

// $ rustc --target=x86_64-unknown-linux-musl test.rs
// $ ./test
// fish: “./test” terminated by signal SIGSEGV (Address boundary error)

Stack trace:

(gdb) bt
#0  0x0000555555558193 in _start_c ()
#1  0x00007fffffffc6b9 in ?? ()
#2  0x00000000178bfbff in ?? ()
#3  0x0000000000000064 in ?? ()
#4  0x0000000000000000 in ?? ()

The faulting instruction is this:

0x0000555555558193 <+291>:   mov    0x8(%rdx),%rsi

The register value is not obviously wrong (i.e. its not 0 or something like that), so could be a buffer overrun of some sort.

rustc 1.45.0 (5c1f21c 2020-07-13) works.
rustc 1.46.0-beta.2 (6f95990 2020-07-23) fails.
rustc 1.47.0-nightly (5ef299e 2020-07-24) fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-NixOSOperating system: NixOS, https://nixos.org/O-muslTarget: The musl libcT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions