Skip to content

Segfault on amd64 under QEMU #147026

@lczyk

Description

@lczyk

I tried this code:

docker run -it --rm --platform=linux/amd64 ubuntu:25.04 bash -c '
apt update && apt install -y curl;
curl --proto \'=https\' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y;
. "$HOME/.cargo/env";
rustc --help'

I expected to see this happen: no segfault

Instead, this happened: segfault

note: we would appreciate a report at https://github.com/rust-lang/rust
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
qemu: uncaught target signal 11 (Segmentation fault) - core dumped

note: i'm on arm64 host.

reminds me of this issue which i've reported a while ago, which turned out to be an issue in upstream golang.

this is an escalation of this issue.

Meta

rustc --version --verbose: 1.90-x86_64-unknown-linux-gnu

Backtrace

/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(+0x3c83a9f) [0xffffade83a9f]
/lib/x86_64-linux-gnu/libc.so.6(+0x458d0) [0xffffaa0268d0]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc(realloc+0xc5c) [0x55555557be2c]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(+0x5403598) [0xffffaf603598]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(_ZN5alloc3ffi5c_str7CString19_from_vec_unchecked17hd3132e195204e147E+0x4d) [0xffffb06ea54d]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(_ZN118_$LT$std..thread..thread_name_string..ThreadNameString$u20$as$u20$core..convert..From$LT$alloc..string..String$GT$$GT$4from17h40ccdde012c08396E+0x49) [0xffffb06ea65d]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(_RNvCsaeDQxODg9Sp_17rustc_driver_impl21install_ctrlc_handler+0x1da) [0xffffb070efda]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(_RNvCsaeDQxODg9Sp_17rustc_driver_impl4main+0x15e) [0xffffb071049e]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc(+0x37a37) [0x55555558da37]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc(+0x37a23) [0x55555558da23]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc(+0x37a19) [0x55555558da19]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-890dfd19c9b338c0.so(_ZN3std2rt19lang_start_internal17h34f9328d113fd60aE+0x491) [0xffffb077c451]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc(+0x74da7) [0x5555555cada7]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a578) [0xffffaa00b578]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0xffffaa00b63b]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc(+0x74cb4) [0x5555555cacb4]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-external-bugCategory: issue that is caused by bugs in software beyond our controlE-needs-investigationCall for partcipation: This issues needs some investigation to determine current statusI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions