Skip to content

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

Open
@rocallahan

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.

Metadata

Metadata

Assignees

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