rust-lang / rust-lang/rust

ICE: hit debug-assertions assertion `left == right` failed in compiler/rustc_middle/src/hir/map/mod.rs

Open
#124,125 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-proc-macros C-bug I-ICE requires-debug-assertions S-has-mcve T-compiler
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

Code

https://github.com/SeaDve/Kooha/

tag: v2.2.3

Meta

rustc --version --verbose:

rustc 1.78.0 (6fd191292 2024-04-12) (gentoo)
binary: rustc
commit-hash: 6fd1912922a7b468b1875d16571bb7a00d5df93f
commit-date: 2024-04-12
host: x86_64-unknown-linux-musl
release: 1.78.0
LLVM version: 18.1.3

It's a rustc build with debug-assertions enabled. I build it from beta(2024-04-13) tar ball using gentoo ebuild.

Error output
   Compiling kooha v2.2.3 (/tmp/portage/media-video/kooha-2.2.3/work/kooha-2.2.3)
thread 'rustc' panicked at compiler/rustc_middle/src/hir/map/mod.rs:917:9:
assertion `left == right` failed
  left: #0
 right: #1465

Backtrace is too long...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure by building Kooha v2.2.3 with rustc 1.78.0 built with debug assertions enabled. Start at compiler/rustc_middle/src/hir/map/mod.rs:917 and inspect the HIR map state leading to the left == right assertion. Done means the compiler no longer panics on this reproduction and the underlying regression is covered by an appropriate compiler test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.