Description
I tried compiling this Rust project on native riscv hardware. The project uses deps like serde, arrayvec, and others that involve macros and traits.
I expected to see this happen:
build using cargo build --release
Instead this happened:
rustc crashes with a segmentation fault (SIGSEGV) inside libc.so.6. This occurs on both stable and nightly Rust, even after setting high stack limits (RUST_MIN_STACK=4294967296, i.e. 4 GB) and with 8 GiB of swap active.
rustc --version --verbose:
rayan@k1:~$ rustc --version --verbose
rustc 1.88.0 (6b00bc3 2025-06-23)
binary: rustc
commit-hash: 6b00bc3
commit-date: 2025-06-23
host: riscv64gc-unknown-linux-gnu
release: 1.88.0
LLVM version: 20.1.5
Repository:
https://github.com/planetryan/qoa
To reproduce, clone the repository and run on riscv cpu
export RUST_MIN_STACK=4294967296
ulimit -s unlimited
cargo build --release
Even compiling deps like serde crashs the compiler with a SIGSEGV on native RISC-V hardware.