Skip to content

x86_64-unknown-linux-gnu using 'target-feature=+crt-static' exits with: Segmentation fault (core dumped). #100110

Open
@noonuid

Description

@noonuid

I expected to see this happen: complied program with static linking runs normally.

Instead, this happened:

  • when i debug, it exits with: Stop reason: signal SIGSEGV: invalid address (fault address: 0xe5)
  • when i run the executable directly, it exits with: Segmentation fault (core dumped)

But when i debug the executable without static linking, it works well. And when i build with '--target x86_64-unknown-linux-musl', it works well, too.

I think it's not a code error, but some config problems.

Meta

rustc --version --verbose:

rustc 1.59.0 (9d1b2106e 2022-02-23)
binary: rustc
commit-hash: 9d1b2106e23b1abd32fce1f17267604a5102f57a
commit-date: 2022-02-23
host: x86_64-unknown-linux-gnu
release: 1.59.0
LLVM version: 13.0.0
Backtrace

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesA-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.O-linuxOperating system: Linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions