Repository: rust
Issue: SIGSEGV when compiling with 1.83.0
Labels: I-crash,S-needs-repro,C-defective-hardware

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.
http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
-->

### Code

Unfortunately, this is just something that I experienced when compiling i3status-rs; I don't have a minimal code example and have not been able to reproduce in subsequent clean/build attempts, so I understand if this is closed as no repro, but I figured I'd share what I saw just in case it sparks something. The steps I took:

1. Clone https://github.com/greshake/i3status-rust
2. Install rust 1.83.0 via `rustup`
3. `cargo install --path . --locked`
    1. At this point, I received `Backtrace 1` (below).
4. `cargo install --path . --locked`
    1. At this point, I received `Backtrace 2` (below).
5. Retry 4 several times. Each time, received `Backtrace 2`
6. Install rust 1.82.0 via `rustup`
7. `cargo install --path . --locked` - This was successful
8. Install rust 1.84.0-beta5 via `rustup`
9. `cargo install --path . --locked` - This was successful
10. Switch back to rust 1.83.0
11. `cargo install --path . --locked` - This was successful

Again, I understand if this isn't enough info to successfully find a bug, but unfortunately it's all I've got. Every attempt I've made to repro since the initial backtraces has failed (ie, compiled successfully), including fully cleaning the repo and compiling completely from scratch.

### 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.83.0 (90b35a623 2024-11-26)
binary: rustc
commit-hash: 90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf
commit-date: 2024-11-26
host: x86_64-unknown-linux-gnu
release: 1.83.0
LLVM version: 19.1.1
```
<version>
```

### Error output

```
<output>
Full backtrace below, I don't have any more than that.
```

<!--
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>Backtrace 1 (Initial Build):</strong></summary>
<p>

```
<backtrace>
error: rustc interrupted by SIGSEGV, printing backtrace

/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x3520f13)[0x7f135b720f13]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f1358019520]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(_RNvXNtCsfp4j0w2N6Xi_19rustc_mir_transform15mentioned_itemsNtB2_14MentionedItemsNtNtB4_12pass_manager7MirPass8run_pass+0xcc3)[0x7f135a3e6433]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(_RNvCsfp4j0w2N6Xi_19rustc_mir_transform13optimized_mir+0x289)[0x7f135d30a649]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x5108369)[0x7f135d308369]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x4c24b2d)[0x7f135ce24b2d]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x4c241b3)[0x7f135ce241b3]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(_RNvNtCsfp4j0w2N6Xi_19rustc_mir_transform18cross_crate_inline21cross_crate_inlinable+0x556)[0x7f135a27a9c6]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x5048b75)[0x7f135d248b75]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x50478ca)[0x7f135d2478ca]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x50474ca)[0x7f135d2474ca]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x57b5d27)[0x7f135d9b5d27]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x57b48bc)[0x7f135d9b48bc]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(_RNvXNtCsfp4j0w2N6Xi_19rustc_mir_transform6inlineNtB2_6InlineNtNtB4_12pass_manager7MirPass8run_pass+0x26b)[0x7f135d9b3d2d]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x4c0b3dd)[0x7f135ce0b3dd]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(_RNvCsfp4j0w2N6Xi_19rustc_mir_transform13optimized_mir+0x63a)[0x7f135d30a9fa]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x5108369)[0x7f135d308369]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x4c24b2d)[0x7f135ce24b2d]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x4c241b3)[0x7f135ce241b3]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(_RNvNtCsfp4j0w2N6Xi_19rustc_mir_transform18cross_crate_inline21cross_crate_inlinable+0x556)[0x7f135a27a9c6]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x5048b75)[0x7f135d248b75]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x50478ca)[0x7f135d2478ca]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x50474ca)[0x7f135d2474ca]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(_RNvNtCs7RnDN1nbn6O_12rustc_passes9reachable13reachable_set+0x8c7)[0x7f135d2ebf87]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x59f5234)[0x7f135dbf5234]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x59f41ea)[0x7f135dbf41ea]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x59f3a9e)[0x7f135dbf3a9e]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x5cd2e2a)[0x7f135ded2e2a]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(_RNvNtNtCse0EV7zojsSO_14rustc_metadata5rmeta7encoder15encode_metadata+0xc0a)[0x7f135decc59a]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(_RNvNtCse0EV7zojsSO_14rustc_metadata2fs25encode_and_write_metadata+0x2df)[0x7f135debdb33]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(_RNvMs3_NtCsbJfLK9LPwAh_15rustc_interface7queriesNtB5_6Linker24codegen_and_build_linker+0x106)[0x7f135debc9d6]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x59621d4)[0x7f135db621d4]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x59533d9)[0x7f135db533d9]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x5a22fac)[0x7f135dc22fac]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x5a23a6b)[0x7f135dc23a6b]
/lib/x86_64-linux-gnu/libc.so.6(+0x94ac3)[0x7f135806bac3]
/lib/x86_64-linux-gnu/libc.so.6(+0x126850)[0x7f13580fd850]

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
note: backtrace dumped due to SIGSEGV! resuming signal
   Compiling neli-proc-macros v0.1.3
error: could not compile `ring` (lib)

Caused by:
  process didn't exit successfully: `/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name ring --edition=2021 /home/fred/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=200 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C linker-plugin-lto --cfg 'feature="alloc"' --cfg 'feature="default"' --cfg 'feature="dev_urandom_fallback"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("alloc", "default", "dev_urandom_fallback", "less-safe-getrandom-custom-or-rdrand", "slow_tests", "std", "test_logging", "unstable-testing-arm-no-hw", "unstable-testing-arm-no-neon", "wasm32_unknown_unknown_js"))' -C metadata=8508e9072b9ffe5d -C extra-filename=-8508e9072b9ffe5d --out-dir /home/fred/.dotfiles/config/i3status-rust/target/release/deps -C strip=debuginfo -L dependency=/home/fred/.dotfiles/config/i3status-rust/target/release/deps --extern cfg_if=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libcfg_if-2c8890ec7a4be5be.rmeta --extern getrandom=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libgetrandom-12e2d95801b19b20.rmeta --extern spin=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libspin-ca0362b34280e78b.rmeta --extern untrusted=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libuntrusted-f24073a689d23cf0.rmeta --cap-lints allow -L native=/home/fred/.dotfiles/config/i3status-rust/target/release/build/ring-2cba77927bd52185/out -l static=ring_core_0_17_8_ -l static=ring_core_0_17_8_test` (signal: 11, SIGSEGV: invalid memory reference)
```

</p>
</details>

<details><summary><strong>Backtrace 2 (Subsequent Builds):</strong></summary>
<p>

```
<backtrace>
error: rustc interrupted by SIGSEGV, printing backtrace

/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x3520f13)[0x7f4586b20f13]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f4583419520]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x527f1d0)[0x7f458887f1d0]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x527eb3a)[0x7f458887eb3a]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x5ac15d3)[0x7f45890c15d3]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x5ac453a)[0x7f45890c453a]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x59626f6)[0x7f4588f626f6]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x59533d9)[0x7f4588f533d9]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x5a22fac)[0x7f4589022fac]
/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-a1396821e0813435.so(+0x5a23a6b)[0x7f4589023a6b]
/lib/x86_64-linux-gnu/libc.so.6(+0x94ac3)[0x7f458346bac3]
/lib/x86_64-linux-gnu/libc.so.6(+0x126850)[0x7f45834fd850]

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
error: could not compile `i3status-rs` (lib)

Caused by:
  process didn't exit successfully: `/home/fred/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name i3status_rs --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=200 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C linker-plugin-lto --cfg 'feature="default"' --cfg 'feature="libpulse-binding"' --cfg 'feature="pulseaudio"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("debug_borders", "default", "glob", "icu_calendar", "libpulse-binding", "maildir", "notmuch", "pipewire", "pulseaudio"))' -C metadata=0d08f14994b5b789 -C extra-filename=-0d08f14994b5b789 --out-dir /home/fred/.dotfiles/config/i3status-rust/target/release/deps -C strip=debuginfo -L dependency=/home/fred/.dotfiles/config/i3status-rust/target/release/deps --extern async_trait=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libasync_trait-0c5c751912fae825.so --extern backon=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libbackon-5340a4af2e6c14f6.rmeta --extern base64=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libbase64-51993054c6d47196.rmeta --extern calibright=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libcalibright-92355b3d5a75f536.rmeta --extern chrono=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libchrono-97c00698bfd90220.rmeta --extern chrono_tz=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libchrono_tz-6e5bbd3294d6e9e2.rmeta --extern clap=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libclap-7b58538aafd9a985.rmeta --extern debounced=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libdebounced-1e8bd888db949001.rmeta --extern dirs=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libdirs-296c6706a2a168ce.rmeta --extern env_logger=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libenv_logger-d1ffd9b7da638f4a.rmeta --extern futures=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libfutures-ed0fb5c7df476adc.rmeta --extern hyper=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libhyper-754668fd2d512189.rmeta --extern iana_time_zone=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libiana_time_zone-5df8ef486e0df093.rmeta --extern icalendar=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libicalendar-af0b60e52dedad87.rmeta --extern indexmap=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libindexmap-7c29f0542c8225ba.rmeta --extern inotify=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libinotify-ec2aebac7e113e11.rmeta --extern itertools=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libitertools-7af15bed5b8dc417.rmeta --extern libc=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/liblibc-2df993e0e790f285.rmeta --extern libpulse_binding=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/liblibpulse_binding-6e302c8339f5e080.rmeta --extern log=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/liblog-6c7f331056a1030d.rmeta --extern neli=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libneli-e4f798467d99b39d.rmeta --extern neli_wifi=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libneli_wifi-f368ea2626c0e3c3.rmeta --extern nix=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libnix-0e3c0132322f5a07.rmeta --extern nom=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libnom-a3ca2c125b1329b2.rmeta --extern oauth2=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/liboauth2-56bbf9b705eabb48.rmeta --extern quick_xml=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libquick_xml-417e090c6a80988f.rmeta --extern regex=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libregex-50002f2c598c4f0a.rmeta --extern reqwest=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libreqwest-b0824417c3bce2c3.rmeta --extern sensors=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libsensors-bac09d8b5a7ae532.rmeta --extern serde=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libserde-297e925250158b93.rmeta --extern serde_json=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libserde_json-3494bd55cb87f634.rmeta --extern shellexpand=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libshellexpand-cd9a1620efd215b0.rmeta --extern signal_hook=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libsignal_hook-b56e1ca05c9a3bb9.rmeta --extern signal_hook_tokio=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libsignal_hook_tokio-07c5e1341c4dd0a8.rmeta --extern smart_default=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libsmart_default-803a1d2fcfc60d24.so --extern sunrise=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libsunrise-2707b3ea79515516.rmeta --extern swayipc_async=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libswayipc_async-f74fd13b6f85aada.rmeta --extern thiserror=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libthiserror-0628287c6bb7f62a.rmeta --extern tokio=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libtokio-42a0bc4e326b3a95.rmeta --extern toml=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libtoml-17fcfcde14ad74ef.rmeta --extern unicode_segmentation=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libunicode_segmentation-57627c62d1bc1eeb.rmeta --extern wayrs_client=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libwayrs_client-f40084c9b1a36d9d.rmeta --extern wayrs_protocols=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libwayrs_protocols-00819333c1a50da0.rmeta --extern zbus=/home/fred/.dotfiles/config/i3status-rust/target/release/deps/libzbus-4e0e8210e028033b.rmeta -L native=/home/fred/.dotfiles/config/i3status-rust/target/release/build/ring-2cba77927bd52185/out` (signal: 11, SIGSEGV: invalid memory reference)
error: failed to compile `i3status-rs v0.33.2 (/home/fred/.dotfiles/config/i3status-rust)`, intermediate artifacts can be found at `/home/fred/.dotfiles/config/i3status-rust/target`.
```

</p>
</details>