ICE: InstSimplify panic with `unexpected body ty: bool` when optimizing `num-traits` `hypot`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
yocto wrynose
ERROR: librsvg-2.61.3-2ArchYocto do_compile: Execution of '/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/temp/run.do_compile.55012' failed with exit code 1
ERROR: Logfile of failure stored in: /work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/temp/log.do_compile.55012
Log data follows:
| DEBUG: Executing shell function do_compile
| [0/13] /work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot-native/usr/bin/meson.real --internal exe --unpickle /work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/build/meson-private/meson_exe_cargo_wrapper.py_983837ee3bfb6a7ce6e5bee49627a125d46bd754.dat
| Compiling proc-macro2 v1.0.103
| Compiling quote v1.0.41
| Compiling unicode-ident v1.0.22
| Compiling winnow v0.7.13
| Compiling toml_datetime v0.7.3
| Compiling target-lexicon v0.13.3
| Compiling smallvec v1.15.1
| Compiling heck v0.5.0
| Building [ ] 0/239: unicode-ident, target-lexic…
| Compiling serde_spanned v1.0.3
| Building [ ] 1/239: serde_spanned, target-lexic…
| Compiling pkg-config v0.3.32
| Building [ ] 2/239: target-lexicon(build.rs), w…
| Compiling version-compare v0.2.1
| Building [ ] 3/239: target-lexicon(build.rs), v…
| Building [ ] 4/239: target-lexicon(build.rs), v…
| Compiling libc v0.2.177
| Building [ ] 5/239: target-lexicon(build.rs), v…
| Building [ ] 6/239: target-lexicon(build.rs), v…
| Compiling rand_core v0.6.4
| Building [ ] 7/239: target-lexicon(build.rs), v…
| Building [ ] 8/239: target-lexicon(build.rs), v…
| Compiling siphasher v1.0.1
| Building [> ] 9/239: siphasher, target-lexicon(b…
| Compiling autocfg v1.5.0
| Building [> ] 10/239: siphasher, target-lexicon(b…
| Building [> ] 11/239: siphasher, target-lexicon(b…
| Compiling rand v0.8.5
| Building [> ] 12/239: siphasher, target-lexicon(b…
| Building [> ] 13/239: siphasher, winnow, rand, pr…
| Building [> ] 14/239: siphasher, winnow, rand, pr…
| Compiling phf_shared v0.11.3
| Building [> ] 15/239: winnow, rand, proc-macro2, …
| Building [> ] 16/239: libc(build), winnow, rand, …
| Building [> ] 17/239: winnow, rand, libc, proc-ma…
| Compiling stable_deref_trait v1.2.1
| Building [> ] 18/239: winnow, rand, libc, proc-ma…
| Compiling cfg-if v1.0.4
| Building [=> ] 19/239: winnow, rand, libc, proc-ma…
| Compiling cfg-expr v0.20.4
| Building [=> ] 20/239: winnow, rand, libc, proc-ma…
| Building [=> ] 21/239: winnow, rand, libc, proc-ma…
| Compiling num-traits v0.2.19
| Building [=> ] 22/239: num-traits(build.rs), winno…
| Building [=> ] 23/239: num-traits(build.rs), winno…
| Building [=> ] 24/239: winnow, rand, libc, proc-ma…
| Compiling equivalent v1.0.2
| Building [=> ] 25/239: equivalent, winnow, rand, l…
| Compiling hashbrown v0.16.0
| Building [=> ] 26/239: hashbrown, winnow, rand, li…
| Compiling syn v2.0.108
| Building [=> ] 27/239: hashbrown, syn, winnow, ran…
| Compiling phf_generator v0.11.3
| Building [==> ] 28/239: hashbrown, syn, winnow, lib…
| Building [==> ] 29/239: hashbrown, syn, winnow, lib…
| Compiling memchr v2.7.6
| Building [==> ] 30/239: memchr, hashbrown, syn, win…
| Compiling bitflags v2.10.0
| Building [==> ] 31/239: memchr, hashbrown, syn, win…
| Compiling serde_core v1.0.228
| Building [==> ] 32/239: memchr, hashbrown, syn, win…
| Compiling indexmap v2.12.0
| Building [==> ] 33/239: memchr, hashbrown, syn, win…
| Compiling futures-core v0.3.31
| Building [==> ] 34/239: memchr, syn, winnow, bitfla…
| Building [==> ] 35/239: serde_core(build), memchr, …
| Compiling phf_codegen v0.11.3
| Building [==> ] 36/239: serde_core(build), memchr, …
| Building [===> ] 37/239: phf_shared, memchr, syn, ph…
| Compiling slab v0.4.11
| Building [===> ] 38/239: phf_shared, memchr, syn, ph…
| Compiling pin-project-lite v0.2.16
| Building [===> ] 39/239: phf_shared, memchr, syn, pi…
| Compiling parking_lot_core v0.9.12
| Building [===> ] 40/239: phf_shared, memchr, syn, wi…
| Compiling toml_parser v1.0.4
| Building [===> ] 41/239: phf_shared, memchr, syn, to…
| Compiling new_debug_unreachable v1.0.6
| Building [===> ] 42/239: memchr, syn, toml_parser, w…
| error: internal compiler error: /rustc-dev/e408947bfd200af42db322daf0fadfe7e26d3bd1/compiler/rustc_mir_transform/src/instsimplify.rs:298:18: unexpected body ty: bool
|
|
| thread 'rustc' (55399) panicked at /rustc-dev/e408947bfd200af42db322daf0fadfe7e26d3bd1/compiler/rustc_mir_transform/src/instsimplify.rs:298:18:
| Box
| stack backtrace:
| 0: 0x7e4eb7bc3160 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h9f476eb6ac289f17
| 1: 0x7e4eb7c5297a - core::fmt::write::hf47a38ed0fb2793c
| 2: 0x7e4eb7bd7d3c -
| 3: 0x7e4eb7bbe0b2 -
| 4: 0x7e4eb7c145af -
| 5: 0x7e4eb7c1448f - std::panicking::default_hook::h200e77b2200290a9
| 6: 0x7e4eb412b434 -
| 7: 0x7e4eb7c1476e - std::panicking::panic_with_hook::hd6ad244ed9caecff
| 8: 0x7e4eb7685913 -
| 9: 0x7e4eb767f836 - std[b88e0a3e3d0e5d1d]::sys::backtrace::__rust_end_short_backtrace::<std[b88e0a3e3d0e5d1d]::panicking::begin_panic<rustc_errors[97996eae2fdbd94c]::ExplicitBug>::{closure#0}, !>
| 10: 0x7e4eb404e9ea - std[b88e0a3e3d0e5d1d]::panicking::begin_panic::<rustc_errors[97996eae2fdbd94c]::ExplicitBug>
| 11: 0x7e4eb4048f62 - <rustc_errors[97996eae2fdbd94c]::diagnostic::BugAbort as rustc_errors[97996eae2fdbd94c]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
| 12: 0x7e4eb74af3b0 -
| 13: 0x7e4eb74af3f8 -
| 14: 0x7e4eb74ad12b -
| 15: 0x7e4eb403daf5 - rustc_middle[6731899c85154449]::util:🐛:bug_fmt
| 16: 0x7e4eb4f9d9f9 - <rustc_mir_transform[7ac78d44ade7a99d]::instsimplify::InstSimplify as rustc_mir_transform[7ac78d44ade7a99d]::pass_manager::MirPass>::run_pass
| 17: 0x7e4eb5011fcc -
| 18: 0x7e4eb4ded936 -
| 19: 0x7e4eb4decafc - rustc_mir_transform[7ac78d44ade7a99d]::optimized_mir
| 20: 0x7e4eb6316802 -
| 21: 0x7e4eb63d3df0 -
| 22: 0x7e4eb6271442 - rustc_query_system[9c84c4c2139e8ba5]::query::plumbing::try_execute_query::<rustc_query_impl[66da206573e004d4]::DynamicConfig<rustc_query_system[9c84c4c2139e8ba5]::query::caches::DefIdCache<rustc_middle[6731899c85154449]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[66da206573e004d4]::plumbing::QueryCtxt, false>
| 23: 0x7e4eb645264a -
| 24: 0x7e4eb6cb108c -
| 25: 0x7e4eb3ffb16c -
| 26: 0x7e4eb6cc869e -
| 27: 0x7e4eb6cc3d41 - rustc_metadata[451ad2038521ffb2]::rmeta::encoder::encode_metadata
| 28: 0x7e4eb6d162fb - rustc_metadata[451ad2038521ffb2]::fs::encode_and_write_metadata
| 29: 0x7e4eb42b4382 -
| 30: 0x7e4eb42dc25a - <rustc_interface[3f92c29c7bade375]::queries::Linker>::codegen_and_build_linker
| 31: 0x7e4eb40e42ea -
| 32: 0x7e4eb410515e -
| 33: 0x7e4eb40d2280 -
| 34: 0x7e4eb40bbefa -
| 35: 0x7e4eb415e8cb -
| 36: 0x7e4eb41515ce -
| 37: 0x7e4eb411d9f8 -
| 38: 0x7e4eb40ecd66 -
| 39: 0x7e4eb7bee807 -
| 40: 0x7e4eb36a032c - start_thread
| 41: 0x7e4eb371bb2c - __clone3
| 42: 0x0 -
|
| note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
|
| note: rustc 1.94.1 (e408947bf 2026-03-25) (built from a source tarball) running on x86_64-unknown-linux-gnu
|
| note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C linker=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/wrapper/target-rust-ccld -C strip=debuginfo
|
| note: some of the compiler flags provided by cargo are hidden
|
| query stack during panic:
| #0 [optimized_mir] optimizing MIR for float::<impl at /usr/src/debug/librsvg/2.61.3/sources/cargo_home/bitbake/num-traits-0.2.19/src/float.rs:1917:9: 1917:26>::hypot
| end of query stack
| Compiling serde v1.0.228
| Building [===> ] 43/239: memchr, syn, toml_parser, w…
| error: could not compile num-traits (lib)
|
| Caused by:
| process didn't exit successfully: rustc --crate-name num_traits --edition=2021 /work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/sources/cargo_home/bitbake/num-traits-0.2.19/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="i128"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("default", "i128", "libm", "std"))' -C metadata=b1980689eb5ce74d -C extra-filename=-983aaacba0a21dcd --out-dir /work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/build/target/aarch64-unknown-linux-gnu/release/deps --target aarch64-unknown-linux-gnu -C linker=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/wrapper/target-rust-ccld -C strip=debuginfo -L dependency=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/build/target/aarch64-unknown-linux-gnu/release/deps -L dependency=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/build/target/release/deps --cap-lints allow -L /work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/lib/aarch64-linux-gnu/rustlib/aarch64-unknown-linux-gnu/lib --remap-path-prefix=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3=/usr/src/debug/librsvg/2.61.3 --cfg has_total_cmp --check-cfg 'cfg(has_total_cmp)' (exit status: 101)
| warning: build failed, waiting for other jobs to finish...
| Building [===> ] 44/239: memchr, syn, toml_parser, w…
| Building [===> ] 45/239: memchr, syn, toml_parser, s…
| Building [====> ] 46/239: memchr, syn, toml_parser, s…
| Building [====> ] 47/239: memchr, syn, toml_parser, i…
| Building [====> ] 48/239: syn, toml_parser, indexmap
| Building [====> ] 49/239: syn, toml_parser
| Building [====> ] 50/239: syn
| Error: CliError { error: Some(1 job failed
|
| Stack backtrace:
| 0:
| 1:
| 2:
| 3:
| 4:
| 5:
| 6:
| 7:
| 8:
| 9:
| 10:
| 11: __libc_start_call_main
| 12: __libc_start_main@GLIBC_2.2.5
| 13: ), exit_code: 101 }
| command: ['/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot-native/usr/bin/cargo', 'cbuild', '--locked', '--prefix', '/usr', '--libdir', '/usr/lib/aarch64-linux-gnu', '--library-type', 'staticlib', '--manifest-path', '/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/sources/librsvg-2.61.3/Cargo.toml', '--target-dir', '/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/build/target', '--release', '--target', 'aarch64-unknown-linux-gnu', '--features', 'pixbuf', '-p', 'librsvg-c'], env: {}
| Traceback (most recent call last):
| File "/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/sources/librsvg-2.61.3/meson/cargo_wrapper.py", line 194, in
| subprocess.run(cargo_cmd, env=env, check=True)
| ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot-native/usr/lib/python3.14/subprocess.py", line 578, in run
| raise CalledProcessError(retcode, process.args,
| output=stdout, stderr=stderr)
| subprocess.CalledProcessError: Command '['/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot-native/usr/bin/cargo', 'cbuild', '--locked', '--prefix', '/usr', '--libdir', '/usr/lib/aarch64-linux-gnu', '--library-type', 'staticlib', '--manifest-path', '/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/sources/librsvg-2.61.3/Cargo.toml', '--target-dir', '/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/build/target', '--release', '--target', 'aarch64-unknown-linux-gnu', '--features', 'pixbuf', '-p', 'librsvg-c']' returned non-zero exit status 1.
| while executing ['/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/sources/librsvg-2.61.3/meson/cargo_wrapper.py', '--cargo', '/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot-native/usr/bin/cargo', '--manifest-path', '/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/sources/librsvg-2.61.3/Cargo.toml', '--project-build-root', '/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/build', '--prefix', '/usr', '--libdir', 'lib/aarch64-linux-gnu', '--release', '--target', 'aarch64-unknown-linux-gnu', '--command=cbuild', '--current-build-dir', 'rsvg', '--current-source-dir', '/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/sources/librsvg-2.61.3/rsvg', '--packages', 'librsvg-c', '--extension', 'a', '--pixbuf']
| [3/13] aarch64-linux-gnu-gcc -march=armv8-a+crc -mbranch-protection=standard -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot -Ilibrsvg-c/tests-c/api.p -Ilibrsvg-c/tests-c -I../sources/librsvg-2.61.3/librsvg-c/tests-c -Iinclude -I../sources/librsvg-2.61.3/include -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/glib-2.0 -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/libmount -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/blkid -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/gdk-pixbuf-2.0 -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/cairo -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/freetype2 -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/libpng16 -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/pixman-1 -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/harfbuzz -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/libxml2 -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/pango-1.0 -I/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot/usr/include/fribidi -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -ffile-prefix-map=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/sources/librsvg-2.61.3=/usr/src/debug/librsvg/2.61.3 -ffile-prefix-map=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/build=/usr/src/debug/librsvg/2.61.3 -ffile-prefix-map=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot= -ffile-prefix-map=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot-native= -pipe -pthread -DTEST_DATA_DIR=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/sources/librsvg-2.61.3/librsvg-c/tests-c -DTEST_SRC_DIR=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/build/librsvg-c/tests-c -DTOP_SRC_DIR=/work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/sources/librsvg-2.61.3 -DHAVE_PIXBUF -MD -MQ librsvg-c/tests-c/api.p/api.c.o -MF librsvg-c/tests-c/api.p/api.c.o.d -o librsvg-c/tests-c/api.p/api.c.o -c ../sources/librsvg-2.61.3/librsvg-c/tests-c/api.c
| FAILED: [code=1] rsvg/librsvg_2.a
| /work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot-native/usr/bin/meson.real --internal exe --unpickle /work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/build/meson-private/meson_exe_cargo_wrapper.py_983837ee3bfb6a7ce6e5bee49627a125d46bd754.dat
| ninja: build stopped: subcommand failed.
| INFO: autodetecting backend as ninja
| INFO: calculating backend command to run: /work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/recipe-sysroot-native/usr/bin/ninja -j 8 -v
| WARNING: exit code 1 from a shell command.
ERROR: Task (/yocto/wrynose/yocto/ArchYocto/meta/recipes-gnome/librsvg/librsvg_2.61.3.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2601 tasks of which 2591 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/yocto/wrynose/yocto/ArchYocto/meta/recipes-gnome/librsvg/librsvg_2.61.3.bb:do_compile
log: /work/workspace/rootfs/yocto6/tmp/work/armv8a-linux-gnu/librsvg/2.61.3/temp/log.do_compile.55012
Summary: There was 1 ERROR message, returning a non-zero exit code.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with rustc_mir_transform/src/instsimplify.rs at line 298 and reproduce the logged rustc command against num-traits-0.2.19. Inspect the MIR optimization of float::::hypot in src/float.rs:1917 and determine why InstSimplify encounters a bool body. Done means the compiler no longer panics on this case and the failure is covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100