Repository: rust
Issue: sporadic compilation segfaults
Labels: I-crash,T-compiler,C-bug,S-needs-repro

hey there :3

i went to deploy to a pretty wonky debian server yesterday but the compiler segfauted. at this point we are sure that this is triggered by the system being misconfigured in some way. we also found issues with memory slots however after having roughly tested the ram with memtest we still ran into the same segfaults. the compiler segfaults disappeared once we booted a different system on the hardware (this is to say that there might be hardware issues involved but imo rather unlikely and more likely this by frankensteinish system configs {however one thing to note is that the rest of the services on that server are seemingly healthy since quite a while}). 

i hope all of this is put concretely enough, if anything is missing please let me know and i can provide more information. we do have backups of this system, but are planning to do a clean install on friday after which i don't know if i am realistically going to be able to reproduce this behavior.

a basic hello world segfaulted more often then not (**but it might also compile**).
so this:
```bash
cargo new hello_world && cd hello_world
# we made sure to always rebuild from scratch as otherwise one passing build would
# make all subsequent builds fail
cargo build && rm -rf target 
```

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.76.0 (07dca489a 2024-02-04)
binary: rustc
commit-hash: 07dca489ac2d933c78d3c5158e3f43beefeb02ce
commit-date: 2024-02-04
host: x86_64-unknown-linux-gnu
release: 1.76.0
LLVM version: 17.0.6
```

i also tried nightly but also ran into segfaults there.

`uname -a`
`Linux hostname 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64 GNU/Linux`
and
`Linux hostname 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux`
(i upgraded the system to no avail - one thing of note may be that i specifically could _not_ find any reference to the syscall `futex_waitv` which is 5.19 and later but only `futex_wait`) 

`apt list libc6-dev` (as syscalls and futex timeouts were involved)
`libc6-dev/oldstable,now 2.31-13+deb11u8 amd64` (installed)
and 
`apt list libc6` 
`libc6/oldstable,now 2.31-13+deb11u8 amd64` (installed)
(and i also installed all recommended or suggested libc on pacakges.debian)



### Error output

i have quite a few more error logs and i think that the segfaults didnt always happen in the same ways.

```
username@hostname:~/helloworlc$ cargo -vv build && rm -rf target/
   Compiling helloworlc v0.1.0 (/home/username/helloworlc)
     Running `CARGO=/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=helloworlc CARGO_CRATE_NAME=helloworlc CARGO_MANIFEST_DIR=/home/username/helloworlc CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=helloworlc CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/home/username/helloworlc/target/debug/deps:/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name helloworlc --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=116 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=0649e50ebb6b8c97 -C extra-filename=-0649e50ebb6b8c97 --out-dir /home/username/helloworlc/target/debug/deps -C incremental=/home/username/helloworlc/target/debug/incremental -L dependency=/home/username/helloworlc/target/debug/deps`
error: rustc interrupted by SIGSEGV, printing backtrace
                                                                                                                    
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x2c31aa6)[0x7f1c532a9aa6]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x13140)[0x7f1c5051f140]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x9eb)[0x7f1c4e98607b]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x2f)[0x7f1c4e98566f]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x266)[0x7f1c4eb8dbba]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(LLVMRustWriteOutputFile+0x190)[0x7f1c5508e358]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a15f95)[0x7f1c5508df95]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a13713)[0x7f1c5508b713]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a133c2)[0x7f1c5508b3c2]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4aabbf1)[0x7f1c55123bf1]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4aab6c2)[0x7f1c551236c2]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xbe8e5)[0x7f1c506108e5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7ea7)[0x7f1c50513ea7]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f1c50431a6f]
                                                                                                                    
note: we would appreciate a report at https://github.com/rust-lang/rust
error: could not compile `helloworlc` (bin "helloworlc")
                                                                                                                    
Caused by:
  process didn't exit successfully: `CARGO=/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=helloworlc CARGO_CRATE_NAME=helloworlc CARGO_MANIFEST_DIR=/home/username/helloworlc CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=helloworlc CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/home/username/helloworlc/target/debug/deps:/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name helloworlc --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=116 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=0649e50ebb6b8c97 -C extra-filename=-0649e50ebb6b8c97 --out-dir /home/username/helloworlc/target/debug/deps -C incremental=/home/username/helloworlc/target/debug/incremental -L dependency=/home/username/helloworlc/target/debug/deps` (signal: 11, SIGSEGV: invalid memory reference)
username@hostname:~/helloworlc$ cargo -vv build && rm -rf target/
   Compiling helloworlc v0.1.0 (/home/username/helloworlc)
     Running `CARGO=/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=helloworlc CARGO_CRATE_NAME=helloworlc CARGO_MANIFEST_DIR=/home/username/helloworlc CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=helloworlc CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/home/username/helloworlc/target/debug/deps:/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name helloworlc --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=116 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=0649e50ebb6b8c97 -C extra-filename=-0649e50ebb6b8c97 --out-dir /home/username/helloworlc/target/debug/deps -C incremental=/home/username/helloworlc/target/debug/incremental -L dependency=/home/username/helloworlc/target/debug/deps`
error: rustc interrupted by SIGSEGV, printing backtrace

/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x2c31aa6)[0x7fac94769aa6]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x13140)[0x7fac919df140]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0xa03)[0x7fac8fe46093]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x2f)[0x7fac8fe4566f]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x266)[0x7fac9004dbba]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(LLVMRustWriteOutputFile+0x190)[0x7fac9654e358]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a15f95)[0x7fac9654df95]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a13713)[0x7fac9654b713]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a133c2)[0x7fac9654b3c2]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4aabbf1)[0x7fac965e3bf1]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4aab6c2)[0x7fac965e36c2]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xbe8e5)[0x7fac91ad08e5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7ea7)[0x7fac919d3ea7]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fac918f1a6f]

note: we would appreciate a report at https://github.com/rust-lang/rust
error: could not compile `helloworlc` (bin "helloworlc")

Caused by:
  process didn't exit successfully: `CARGO=/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=helloworlc CARGO_CRATE_NAME=helloworlc CARGO_MANIFEST_DIR=/home/username/helloworlc CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=helloworlc CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/home/username/helloworlc/target/debug/deps:/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name helloworlc --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=116 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=0649e50ebb6b8c97 -C extra-filename=-0649e50ebb6b8c97 --out-dir /home/username/helloworlc/target/debug/deps -C incremental=/home/username/helloworlc/target/debug/incremental -L dependency=/home/username/helloworlc/target/debug/deps` (signal: 11, SIGSEGV: invalid memory reference)

```

### Another Error

i also found panics in raw vec because of capacity overflows (there are even more traces where i think the causes are different, i am happy to provide them and can also go through them on another day {right now i just need to go to bed :grimacing:})

<details><summary><strong>Raw Vec Panic</strong></summary>

```
Caused by:
  process didn't exit successfully: `/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (signal: 11, SIGSEGV: invalid memory reference)
  --- stderr
  thread 'rustc' panicked at library/alloc/src/raw_vec.rs:571:5:
  capacity overflow
  stack backtrace:
     0:     0x7f516476d6f6 - <unknown>
     1:     0x7f51647bff40 - <unknown>
     2:     0x7f516476153f - <unknown>
     3:     0x7f516476d4d4 - <unknown>
     4:     0x7f5164770267 - <unknown>
     5:     0x7f516476ffc9 - <unknown>
     6:     0x7f51673f661c - std[79729d9c385e1623]::panicking::update_hook::<alloc[6df67106ebca92c0]::boxed::Box<rustc_driver_impl[66ed8fdbde15dc6c]::install_ice_hook::{closure#0}>>::{closure#0}
     7:     0x7f51647709b6 - <unknown>
     8:     0x7f51647706c9 - <unknown>
     9:     0x7f516476dbf6 - <unknown>
    10:     0x7f5164770460 - <unknown>
    11:     0x7f51647bc645 - <unknown>
    12:     0x7f51647ad98f - <unknown>
    13:     0x7f516911acd2 - <alloc[6df67106ebca92c0]::vec::Vec<(std[79729d9c385e1623]::path::PathBuf, std[79729d9c385e1623]::path::PathBuf)> as core[f975038e3cc9791c]::clone::Clone>::clone
    14:     0x7f516911b0c7 - rustc_codegen_llvm[3c1678ba3e8e7d64]::back::write::target_machine_factory
    15:     0x7f516911a952 - rustc_codegen_llvm[3c1678ba3e8e7d64]::back::write::create_informational_target_machine
    16:     0x7f516911ba65 - rustc_codegen_llvm[3c1678ba3e8e7d64]::llvm_util::target_features
    17:     0x7f516911ba37 - <rustc_codegen_llvm[3c1678ba3e8e7d64]::LlvmCodegenBackend as rustc_codegen_ssa[8f0ba34f7d763469]::traits::backend::CodegenBackend>::target_features
    18:     0x7f5169294df0 - rustc_interface[bf5cafa581ab7832]::util::add_configuration
    19:     0x7f51692dff40 - rustc_interface[bf5cafa581ab7832]::interface::run_compiler::<core[f975038e3cc9791c]::result::Result<(), rustc_span[7a149c27976a99e7]::ErrorGuaranteed>, rustc_driver_impl[66ed8fdbde15dc6c]::run_compiler::{closure#0}>::{closure#0}
    20:     0x7f516940e7db - std[79729d9c385e1623]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[bf5cafa581ab7832]::util::run_in_thread_with_globals<rustc_interface[bf5cafa581ab7832]::interface::run_compiler<core[f975038e3cc9791c]::result::Result<(), rustc_span[7a149c27976a99e7]::ErrorGuaranteed>, rustc_driver_impl[66ed8fdbde15dc6c]::run_compiler::{closure#0}>::{closure#0}, core[f975038e3cc9791c]::result::Result<(), rustc_span[7a149c27976a99e7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f975038e3cc9791c]::result::Result<(), rustc_span[7a149c27976a99e7]::ErrorGuaranteed>>
    21:     0x7f516940e639 - <<std[79729d9c385e1623]::thread::Builder>::spawn_unchecked_<rustc_interface[bf5cafa581ab7832]::util::run_in_thread_with_globals<rustc_interface[bf5cafa581ab7832]::interface::run_compiler<core[f975038e3cc9791c]::result::Result<(), rustc_span[7a149c27976a99e7]::ErrorGuaranteed>, rustc_driver_impl[66ed8fdbde15dc6c]::run_compiler::{closure#0}>::{closure#0}, core[f975038e3cc9791c]::result::Result<(), rustc_span[7a149c27976a99e7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f975038e3cc9791c]::result::Result<(), rustc_span[7a149c27976a99e7]::ErrorGuaranteed>>::{closure#1} as core[f975038e3cc9791c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    22:     0x7f516477a8e5 - <unknown>
  error: rustc interrupted by SIGSEGV, printing backtrace
                                                                                                        
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x2c31aa6)[0x7f5167413aa6]
  /lib/x86_64-linux-gnu/libpthread.so.0(+0x13140)[0x7f5164689140]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc(+0x2882d)[0x5645fb08282d]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc(+0x28d83)[0x5645fb082d83]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc(+0x1f3ea)[0x5645fb0793ea]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xda072)[0x7f5164796072]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xda224)[0x7f5164796224]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(_ZN5gimli4read6abbrev13Abbreviations6insert17h4d60ba1a57156ad8E+0x22d)[0x7f516479649d]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0x8b4c2)[0x7f51647474c2]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0x87c0a)[0x7f5164743c0a]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xc5f24)[0x7f5164781f24]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xce8c6)[0x7f516478a8c6]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xc99ad)[0x7f51647859ad]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xb18b0)[0x7f516476d8b0]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xc45c1)[0x7f51647805c1]
  /lib/x86_64-linux-gnu/libgcc_s.so.1(_Unwind_Backtrace+0x64)[0x7f515cbce2b4]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(_ZN91_$LT$std..sys_common..backtrace.._print..DisplayBacktrace$u20$as$u20$core..fmt..Display$GT$3fmt17hbb235daedd7c6190E+0x176)[0x7f516476d6f6]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(_ZN4core3fmt5write17h3ed6aeaa977c8e45E+0x1b0)[0x7f51647bff40]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xa553f)[0x7f516476153f]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xb14d4)[0x7f516476d4d4]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xb4267)[0x7f5164770267]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(_ZN3std9panicking12default_hook17hf5fcb0f213fe709aE+0x269)[0x7f516476ffc9]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x2c1461c)[0x7f51673f661c]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(_ZN3std9panicking20rust_panic_with_hook17h095fccf1dc9379eeE+0x276)[0x7f51647709b6]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xb46c9)[0x7f51647706c9]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xb1bf6)[0x7f516476dbf6]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(_ZN102_$LT$std..panicking..begin_panic_handler..FormatStringPayload$u20$as$u20$core..panic..PanicPayload$GT$8take_box17heb0dcd5e4b4a5c86E+0x0)[0x7f5164770460]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0x100645)[0x7f51647bc645]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xf198f)[0x7f51647ad98f]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4938cd2)[0x7f516911acd2]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x49390c7)[0x7f516911b0c7]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4938952)[0x7f516911a952]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(_RNvNtCs59QrpCZBv10_18rustc_codegen_llvm9llvm_util15target_features+0x25)[0x7f516911ba65]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(_RNvXs5_Cs59QrpCZBv10_18rustc_codegen_llvmNtB5_18LlvmCodegenBackendNtNtNtCschqvOleydkH_17rustc_codegen_ssa6traits7backend14CodegenBackend15target_features+0xf)[0x7f516911ba37]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(_RNvNtCsgqCaRwxIDM4_15rustc_interface4util17add_configuration+0x30)[0x7f5169294df0]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4afdf40)[0x7f51692dff40]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4c2c7db)[0x7f516940e7db]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4c2c639)[0x7f516940e639]
  /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xbe8e5)[0x7f516477a8e5]
  /lib/x86_64-linux-gnu/libpthread.so.0(+0x7ea7)[0x7f516467dea7]
  /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f516459da6f]
                                                                                                        
  note: we would appreciate a report at https://github.com/rust-lang/rust
  note: backtrace dumped due to SIGSEGV! resuming signal

```

</p>
</details>

### LLDB 

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>LLDB</strong></summary>
<p>

obtained by lldb `bt all` (note that these were technically two different rust projects failing here and as said before not all segfaults were alike so yeah but yeah)

```
(lldb) run build
Process 15748 launched: '/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo' (x86_64)
Process 15748 stopped and restarted: thread 1 received signal: SIGCHLD
Process 15748 stopped and restarted: thread 1 received signal: SIGCHLD
Process 15748 stopped and restarted: thread 1 received signal: SIGCHLD
   Compiling hello_world v0.1.0 (/tmp/hello_world)
error: rustc interrupted by SIGSEGV, printing backtrace
                                                                                                                                                                                          
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x2c31aa6)[0x7ffff5098aa6]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x13140)[0x7ffff230e140]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x9eb)[0x7ffff077507b]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x2f)[0x7ffff077466f]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x266)[0x7ffff097cbba]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(LLVMRustWriteOutputFile+0x190)[0x7ffff6e7d358]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a15f95)[0x7ffff6e7cf95]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a13713)[0x7ffff6e7a713]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a133c2)[0x7ffff6e7a3c2]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4aabbf1)[0x7ffff6f12bf1]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4aab6c2)[0x7ffff6f126c2]
/home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xbe8e5)[0x7ffff23ff8e5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7ea7)[0x7ffff2302ea7]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7ffff2220a6f]
                                                                                                                                                                                          
note: we would appreciate a report at https://github.com/rust-lang/rust
Process 15748 stopped and restarted: thread 3 received signal: SIGCHLD
error: could not compile `hello_world` (bin "hello_world")
                                                                                                                                                                                          
Caused by:
  process didn't exit successfully: `rustc --crate-name hello_world --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=63db71e2032dbcc4 -C extra-filename=-63db71e2032dbcc4 --out-dir /tmp/hello_world/target/debug/deps -C incremental=/tmp/hello_world/target/debug/incremental -L dependency=/tmp/hello_world/target/debug/deps` (signal: 11, SIGSEGV: invalid memory reference)
Process 15748 stopped
* thread #2, name = 'cargo', stop reason = signal SIGUSR1
    frame #0: 0x0000555556ca363d cargo`std::sys::unix::locks::futex_condvar::Condvar::wait::hd4469932b30d626b [inlined] std::sys::unix::locks::futex_mutex::Mutex::lock::h2824c483f8557e8f at futex_mutex.rs:28:13
(lldb) bt all
This version of LLDB has no plugin for the mipsassem language. Inspection of frame variables will be limited.
  thread #1, name = 'cargo'
    frame #0: 0x00007ffff7d47f69 libc.so.6`syscall at syscall.S:38
    frame #1: 0x0000555556c9d794 cargo`std::sys::unix::futex::futex_wait::h44b2d96d9c845f91 at futex.rs:62:21
    frame #2: 0x0000555556ca369a cargo`std::sys::unix::locks::futex_condvar::Condvar::wait_timeout::hd94527c2d21ef338 [inlined] std::sys::unix::locks::futex_condvar::Condvar::wait_optional_timeout::hc9031b8473901451 at futex_condvar.rs:49:17
    frame #3: 0x0000555556ca3663 cargo`std::sys::unix::locks::futex_condvar::Condvar::wait_timeout::hd94527c2d21ef338 at futex_condvar.rs:37
    frame #4: 0x0000555556b58507 cargo`_RNvXs3_Cs77E4pHqZjLV_9jobserverNtB5_12HelperThreadNtNtNtCslpQXAMNzwFQ_4core3ops4drop4Drop4drop + 343
    frame #5: 0x0000555555d192bd cargo`_RINvNtCslpQXAMNzwFQ_4core3ptr13drop_in_placeNtCs77E4pHqZjLV_9jobserver12HelperThreadECsdafv1eHZXBe_5cargo + 13
    frame #6: 0x00005555560a0d28 cargo`_RNvMs2_NtNtNtCsdafv1eHZXBe_5cargo4core8compiler9job_queueNtB5_8JobQueue7execute + 6104
    frame #7: 0x000055555606b327 cargo`_RNvMNtNtNtCsdafv1eHZXBe_5cargo4core8compiler7contextNtB2_7Context7compile + 20023
    frame #8: 0x00005555561bee5e cargo`_RNvNtNtCsdafv1eHZXBe_5cargo3ops13cargo_compile10compile_ws + 558
    frame #9: 0x00005555561beb7b cargo`_RNvNtNtCsdafv1eHZXBe_5cargo3ops13cargo_compile7compile + 139
    frame #10: 0x0000555555bcceed cargo`_RNvNtNtCsasa3T5feJmt_5cargo8commands5build4exec + 621
    frame #11: 0x0000555555ba93a0 cargo`_RNvNtCsasa3T5feJmt_5cargo3cli4main + 12272
    frame #12: 0x0000555555be5a7a cargo`_RNvCsasa3T5feJmt_5cargo4main + 1370
    frame #13: 0x0000555555b696a3 cargo`_RINvNtNtCsaqsJ7jMcZrz_3std10sys_common9backtrace28___rust_begin_short_backtraceFEuuECsasa3T5feJmt_5cargo + 3
    frame #14: 0x0000555555b781a9 cargo`_RNCINvNtCsaqsJ7jMcZrz_3std2rt10lang_startuE0Csasa3T5feJmt_5cargo + 9
    frame #15: 0x0000555556c86851 cargo`std::rt::lang_start_internal::h6939038e2873596b [inlined] core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnOnce$LT$A$GT$$u20$for$u20$$RF$F$GT$::call_once::h37600b1e5eea4ecd at function.rs:284:13
    frame #16: 0x0000555556c8684b cargo`std::rt::lang_start_internal::h6939038e2873596b [inlined] std::panicking::try::do_call::hb4bda49fa13a0c2b at panicking.rs:552
    frame #17: 0x0000555556c8684b cargo`std::rt::lang_start_internal::h6939038e2873596b [inlined] std::panicking::try::h8bbf75149211aaaa at panicking.rs:516
    frame #18: 0x0000555556c8684b cargo`std::rt::lang_start_internal::h6939038e2873596b [inlined] std::panic::catch_unwind::h8c78ec68ebea34cb at panic.rs:142
    frame #19: 0x0000555556c8684b cargo`std::rt::lang_start_internal::h6939038e2873596b [inlined] std::rt::lang_start_internal::_$u7b$$u7b$closure$u7d$$u7d$::hffdf44a19fd9e220 at rt.rs:148
    frame #20: 0x0000555556c8684b cargo`std::rt::lang_start_internal::h6939038e2873596b [inlined] std::panicking::try::do_call::hcb3194972c74716d at panicking.rs:552
    frame #21: 0x0000555556c8684b cargo`std::rt::lang_start_internal::h6939038e2873596b [inlined] std::panicking::try::hcdc6892c5f0dba4c at panicking.rs:516
    frame #22: 0x0000555556c8684b cargo`std::rt::lang_start_internal::h6939038e2873596b [inlined] std::panic::catch_unwind::h4910beb4573f4776 at panic.rs:142
    frame #23: 0x0000555556c8684b cargo`std::rt::lang_start_internal::h6939038e2873596b at rt.rs:148
    frame #24: 0x0000555555bebd55 cargo`main + 37
    frame #25: 0x00007ffff7c76d0a libc.so.6`__libc_start_main(main=(cargo`main), argc=2, argv=0x00007fffffffe7d8, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007fffffffe7c8) at libc-start.c:308:16
    frame #26: 0x0000555555b4a029 cargo`_start + 41
* thread #2, name = 'cargo', stop reason = signal SIGUSR1
  * frame #0: 0x0000555556ca363d cargo`std::sys::unix::locks::futex_condvar::Condvar::wait::hd4469932b30d626b [inlined] std::sys::unix::locks::futex_mutex::Mutex::lock::h2824c483f8557e8f at futex_mutex.rs:28:13
    frame #1: 0x0000555556ca363a cargo`std::sys::unix::locks::futex_condvar::Condvar::wait::hd4469932b30d626b [inlined] std::sys::unix::locks::futex_condvar::Condvar::wait_optional_timeout::hc9031b8473901451 at futex_condvar.rs:52
    frame #2: 0x0000555556ca363a cargo`std::sys::unix::locks::futex_condvar::Condvar::wait::hd4469932b30d626b at futex_condvar.rs:33
    frame #3: 0x0000555556b55134 cargo`_RINvNtNtCsaqsJ7jMcZrz_3std10sys_common9backtrace28___rust_begin_short_backtraceNCNvNtCs77E4pHqZjLV_9jobserver3imp12spawn_helpers_0uEB1l_ + 276
    frame #4: 0x0000555556b55496 cargo`_RNSNvYNCINvMNtCsaqsJ7jMcZrz_3std6threadNtBa_7Builder16spawn_unchecked_NCNvNtCs77E4pHqZjLV_9jobserver3imp12spawn_helpers_0uEs_0INtNtNtCslpQXAMNzwFQ_4core3ops8function6FnOnceuE9call_once6vtableB1c_ + 166
    frame #5: 0x0000555556ca17a5 cargo`std::sys::unix::thread::Thread::new::thread_start::hbac657605e4b7389 [inlined] _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h12de4fc57affb195 at boxed.rs:2015:9
    frame #6: 0x0000555556ca179d cargo`std::sys::unix::thread::Thread::new::thread_start::hbac657605e4b7389 [inlined] _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h3c619f45059d5cf1 at boxed.rs:2015
    frame #7: 0x0000555556ca1796 cargo`std::sys::unix::thread::Thread::new::thread_start::hbac657605e4b7389 at thread.rs:108
    frame #8: 0x00007ffff7f72ea7 libpthread.so.0`start_thread(arg=<unavailable>) at pthread_create.c:477:8
    frame #9: 0x00007ffff7d4ea6f libc.so.6`__clone at clone.S:95

```

</p>
</details>

best regards and thanks so much for all the work!