Skip to content

Rust musl build segfaults on startup when linked with LLD 12 #86712

Description

@rocallahan

Steps to reproduce:

$ git clone https://github.com/rocallahan/rust-musl-segfault.git
$ cd rust-musl-segfault
$ cargo +nightly build --target x86_64-unknown-linux-musl
...
$ target/x86_64-unknown-linux-musl/debug/test_crate
Segmentation fault (core dumped)

Since the code is literally

use nix::sys::stat::Mode;

fn main() {
}

I expected it to not segfault.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.O-muslTarget: The musl libcT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions