Repository: rust
Issue: Segfault in rustc while building slint application
Labels: I-crash,C-bug,S-needs-repro

Got a segfault in rustc while building slint:

```
❯ ls
Cargo.lock  Cargo.toml  icons  slintfiles  src  target

slinttuto on  master [?] is 📦 v0.1.0 via 🦀 v1.77.0
❯ cargo build --example circles
   Compiling proc-macro2 v1.0.79
   Compiling unicode-ident v1.0.12
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling libc v0.2.153
   Compiling portable-atomic v1.6.0
   Compiling critical-section v1.1.2
   Compiling log v0.4.21
   Compiling memchr v2.7.1
   Compiling pin-project-lite v0.2.13
   Compiling version_check v0.9.4
   Compiling bitflags v2.5.0
   Compiling libloading v0.8.3
   Compiling cc v1.0.90
   Compiling smallvec v1.13.2
   Compiling bitflags v1.3.2
   Compiling pkg-config v0.3.30
   Compiling syn v1.0.109
   Compiling libm v0.2.8
   Compiling hashbrown v0.14.3
   Compiling arrayvec v0.7.4
   Compiling rustix v0.38.32
   Compiling slab v0.4.9
   Compiling linux-raw-sys v0.4.13
   Compiling equivalent v1.0.1
   Compiling crossbeam-utils v0.8.19
   Compiling aho-corasick v1.1.3
   Compiling toml_datetime v0.6.5
   Compiling winnow v0.5.40
   Compiling wayland-sys v0.31.1
   Compiling quote v1.0.35
   Compiling indexmap v2.2.6
   Compiling syn v2.0.55
   Compiling once_cell v1.19.0
   Compiling tracing-core v0.1.32
   Compiling dlib v0.5.2
   Compiling parking v2.2.0
   Compiling regex-syntax v0.8.2
   Compiling concurrent-queue v2.4.0
   Compiling futures-core v0.3.30
   Compiling byteorder v1.5.0
   Compiling ttf-parser v0.20.0
   Compiling wayland-backend v0.3.3
error: rustc interrupted by SIGSEGV, printing backtrace

/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x2bcd196)[0x7f3682bcd196]
/lib64/libc.so.6(+0x3e9a0)[0x7f3685bb09a0]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4005128)[0x7f3684005128]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4004cba)[0x7f3684004cba]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(_RNvXs4_NtNtCsfeS9XuWYwKa_12rustc_middle3hir3mapNtB5_
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x40f6514)[0x7f36840f6514]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x40f6514)[0x7f36840f6514]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x40f6514)[0x7f36840f6514]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(_RNvNtNtCsfeS9XuWYwKa_12rustc_middle3hir3map15hir_cra
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4913814)[0x7f3684913814]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4b11365)[0x7f3684b11365]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4b117e0)[0x7f3684b117e0]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(_RNvNtCseAUOUBQ7ni4_15rustc_interface16proc_macro_dec
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x3e7f7d7)[0x7f3683e7f7d7]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4b0fdf6)[0x7f3684b0fdf6]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4b0fc3b)[0x7f3684b0fc3b]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(_RNvNtCseAUOUBQ7ni4_15rustc_interface6passes8analysis
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x47c8ddf)[0x7f36847c8ddf]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4827034)[0x7f3684827034]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4826e79)[0x7f3684826e79]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4aea78b)[0x7f3684aea78b]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4d382f1)[0x7f3684d382f1]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-37c42b3bb693526e.so(+0x4d3814f)[0x7f3684d3814f]
/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-320ebc7037fb8f95.so(rust_metadata_std_c78d3cd131ec7074+0xbf675)[0x7f3685e38675]
/lib64/libc.so.6(+0x8e897)[0x7f3685c00897]
/lib64/libc.so.6(+0x115a5c)[0x7f3685c87a5c]

note: we would appreciate a report at https://github.com/rust-lang/rust
note: backtrace dumped due to SIGSEGV! resuming signal
   Compiling getrandom v0.2.12
   Compiling scoped-tls v1.0.1
   Compiling simd-adler32 v0.3.7
   Compiling semver v1.0.22
   Compiling crc32fast v1.4.0
   Compiling downcast-rs v1.2.0
   Compiling memmap2 v0.9.4
   Compiling quick-xml v0.31.0
   Compiling typenum v1.17.0
   Compiling adler v1.0.2
   Compiling thiserror v1.0.58
   Compiling miniz_oxide v0.7.2
   Compiling num-traits v0.2.18
   Compiling memoffset v0.7.1
   Compiling generic-array v0.14.7
   Compiling futures-io v0.3.30
   Compiling wayland-scanner v0.31.1
   Compiling flate2 v1.0.28
   Compiling toml_edit v0.19.15
error: could not compile `syn` (lib)

Caused by:
  process didn't exit successfully: `/home/jgardona/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name syn --edition=2018 /home/jgardona/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-1.0.109/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=159 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="extra-traits"' --cfg 'feature="fold"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' --cfg 'feature="visit"' -C metadata=d0521ca06a504621 -C extra-filename=-d0521ca06a504621 --out-dir /home/jgardona/Workspace/rust/slinttuto/target/debug/deps -L dependency=/home/jgardona/Workspace/rust/slinttuto/target/debug/deps --extern proc_macro2=/home/jgardona/Workspace/rust/slinttuto/target/debug/deps/libproc_macro2-f0a5d5e14a871264.rmeta --extern quote=/home/jgardona/Workspace/rust/slinttuto/target/debug/deps/libquote-cda13238c124e7c8.rmeta --extern unicode_ident=/home/jgardona/Workspace/rust/slinttuto/target/debug/deps/libunicode_ident-771db5337abf6923.rmeta --cap-lints allow --cfg syn_disable_nightly_tests` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
```

### Version
```
rustc 1.77.0 (aedd173a2 2024-03-17)
binary: rustc
commit-hash: aedd173a2c086e558c2b66d3743b344f977621a7
commit-date: 2024-03-17
host: x86_64-unknown-linux-gnu
release: 1.77.0
LLVM version: 17.0.6
```
### System
Linux fedora 6.7.10-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Mar 18 18:56:52 UTC 2024 x86_64 GNU/Linux