Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE in liveness/rwu_table #131817

Closed
thomasyonug opened this issue Oct 17, 2024 · 1 comment
Closed

ICE in liveness/rwu_table #131817

thomasyonug opened this issue Oct 17, 2024 · 1 comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@thomasyonug
Copy link

Code

Sorry, I lost the trigger code when I was modify the crate regex-syntax

Meta

rustc --version --verbose:

rustc 1.83.0-nightly (fa724e5d8 2024-09-27)
binary: rustc
commit-hash: fa724e5d8cbbdfbd1e53c4c656121af01b694406
commit-date: 2024-09-27
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.0

Error output

ICE
Backtrace

thread 'rustc' panicked at compiler/rustc_passes/src/liveness/rwu_table.rs:63:9:
assertion failed: b.index() < self.live_nodes
stack backtrace:
   0:     0x7fef419e4d9a - trace
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x7fef419e4d9a - trace_unsynchronized<std::backtrace::{impl#4}::create::{closure_env#0}>
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fef419e4d9a - create
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/backtrace.rs:331:13
   3:     0x7fef419e4cf5 - std::backtrace::Backtrace::force_capture::h57258592374d8e63
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/backtrace.rs:312:9
   4:     0x7fef42b9fe52 - {closure#0}
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_driver_impl/src/lib.rs:1445:25
   5:     0x7fef42b9fe52 - call<(&(dyn core::ops::function::Fn<(&std::panic::PanicHookInfo), Output=()> + core::marker::Send + core::marker::Sync), &std::panic::PanicHookInfo), rustc_driver_impl::install_ice_hook::{closure_env#0}, alloc::alloc::Global>
                               at /home/ywz/doctor/rust-doctor/rust/library/alloc/src/boxed.rs:2467:9
   6:     0x7fef41a14693 - rust_panic_with_hook
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/panicking.rs:809:13
   7:     0x7fef419d6153 - {closure#0}
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/panicking.rs:667:13
   8:     0x7fef419d60d9 - std::sys::backtrace::__rust_end_short_backtrace::h9e8d7c7e63e58852
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/sys/backtrace.rs:170:18
   9:     0x7fef41a141d7 - begin_panic_handler
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/panicking.rs:665:5
  10:     0x7fef419cc430 - panic_fmt
                               at /home/ywz/doctor/rust-doctor/rust/library/core/src/panicking.rs:74:14
  11:     0x7fef419cc4bc - panic
                               at /home/ywz/doctor/rust-doctor/rust/library/core/src/panicking.rs:148:5
  12:     0x7fef4858c619 - pick2_rows_mut
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness/rwu_table.rs:63:9
  13:     0x7fef4858c619 - union
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness/rwu_table.rs:95:34
  14:     0x7fef484b6b91 - merge_from_succ
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:638:23
  15:     0x7fef484b8901 - propagate_through_expr
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:908:17
  16:     0x7fef484b8f42 - {closure#0}
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:840:38
  17:     0x7fef484b8f42 - map_or<&rustc_hir::hir::Expr, rustc_passes::liveness::LiveNode, rustc_passes::liveness::{impl#3}::propagate_through_opt_expr::{closure_env#0}>
                               at /home/ywz/doctor/rust-doctor/rust/library/core/src/option.rs:1168:24
  18:     0x7fef484b8f42 - propagate_through_opt_expr
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:840:9
  19:     0x7fef484b8f42 - propagate_through_block
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:768:20
  20:     0x7fef484b8f42 - propagate_through_loop
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:1287:23
  21:     0x7fef484b8f42 - propagate_through_expr
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:881:49
  22:     0x7fef484b832b - {closure#0}
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:840:38
  23:     0x7fef484b832b - map_or<&rustc_hir::hir::Expr, rustc_passes::liveness::LiveNode, rustc_passes::liveness::{impl#3}::propagate_through_opt_expr::{closure_env#0}>
                               at /home/ywz/doctor/rust-doctor/rust/library/core/src/option.rs:1168:24
  24:     0x7fef484b832b - propagate_through_opt_expr
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:840:9
  25:     0x7fef484b832b - propagate_through_block
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:768:20
  26:     0x7fef484b832b - propagate_through_expr
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:1154:49
  27:     0x7fef4858ed09 - {closure#0}
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:769:56
  28:     0x7fef4858ed09 - rfold<core::slice::iter::Iter<rustc_hir::hir::Stmt>, rustc_passes::liveness::LiveNode, rustc_passes::liveness::{impl#3}::propagate_through_block::{closure_env#0}>
                               at /home/ywz/doctor/rust-doctor/rust/library/core/src/iter/traits/double_ended.rs:308:21
  29:     0x7fef4858ed09 - fold<core::slice::iter::Iter<rustc_hir::hir::Stmt>, rustc_passes::liveness::LiveNode, rustc_passes::liveness::{impl#3}::propagate_through_block::{closure_env#0}>
                               at /home/ywz/doctor/rust-doctor/rust/library/core/src/iter/adapters/rev.rs:64:9
  30:     0x7fef484b8348 - propagate_through_block
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:769:9
  31:     0x7fef484b8348 - propagate_through_expr
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:1154:49
  32:     0x7fef484b328f - compute
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:713:20
  33:     0x7fef484b328f - check_liveness
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_passes/src/liveness.rs:172:20
  34:     0x7fef48c3246f - {closure#0}
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_query_impl/src/plumbing.rs:283:9
  35:     0x7fef48c3246f - __rust_begin_short_backtrace<rustc_query_impl::query_impl::check_liveness::dynamic_query::{closure#2}::{closure_env#0}, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_query_impl/src/plumbing.rs:548:18
  36:     0x7fef48c8a3f4 - {closure#2}
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_query_impl/src/plumbing.rs:622:25
  37:     0x7fef48c8a3f4 - call_once<rustc_query_impl::query_impl::check_liveness::dynamic_query::{closure_env#2}, (rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>
                               at /home/ywz/doctor/rust-doctor/rust/library/core/src/ops/function.rs:250:5
  38:     0x7fef489a6897 - {closure#0}<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_query_system/src/dep_graph/graph.rs:360:64
  39:     0x7fef489a6897 - {closure#0}<rustc_query_system::dep_graph::graph::{impl#4}::with_task::{closure#0}::{closure_env#0}<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_middle/src/ty/context/tls.rs:82:9
  40:     0x7fef489a6897 - try_with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_query_system::dep_graph::graph::{impl#4}::with_task::{closure#0}::{closure_env#0}<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/thread/local.rs:283:12
  41:     0x7fef489a6897 - with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_query_system::dep_graph::graph::{impl#4}::with_task::{closure#0}::{closure_env#0}<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/thread/local.rs:260:9
  42:     0x7fef4871d39d - enter_context<rustc_query_system::dep_graph::graph::{impl#4}::with_task::{closure#0}::{closure_env#0}<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_middle/src/ty/context/tls.rs:79:5
  43:     0x7fef4871d39d - {closure#0}<rustc_query_system::dep_graph::graph::{impl#4}::with_task::{closure#0}::{closure_env#0}<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_middle/src/dep_graph/mod.rs:33:13
  44:     0x7fef4871d39d - {closure#0}<rustc_middle::dep_graph::{impl#0}::with_deps::{closure_env#0}<rustc_query_system::dep_graph::graph::{impl#4}::with_task::{closure#0}::{closure_env#0}<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_middle/src/ty/context/tls.rs:112:36
  45:     0x7fef4871d39d - with_context_opt<rustc_middle::ty::context::tls::with_context::{closure_env#0}<rustc_middle::dep_graph::{impl#0}::with_deps::{closure_env#0}<rustc_query_system::dep_graph::graph::{impl#4}::with_task::{closure#0}::{closure_env#0}<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_middle/src/ty/context/tls.rs:101:18
  46:     0x7fef4871d39d - with_context<rustc_middle::dep_graph::{impl#0}::with_deps::{closure_env#0}<rustc_query_system::dep_graph::graph::{impl#4}::with_task::{closure#0}::{closure_env#0}<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_middle/src/ty/context/tls.rs:112:5
  47:     0x7fef4871d39d - with_deps<rustc_query_system::dep_graph::graph::{impl#4}::with_task::{closure#0}::{closure_env#0}<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_middle/src/dep_graph/mod.rs:30:9
  48:     0x7fef4898b57c - {closure#0}<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_query_system/src/dep_graph/graph.rs:360:37
  49:     0x7fef4898b57c - with_task<rustc_middle::dep_graph::DepsType, (rustc_query_impl::plumbing::QueryCtxt, rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>), rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_query_system/src/dep_graph/graph.rs:371:14
  50:     0x7fef4898b57c - {closure#2}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_query_system/src/query/plumbing.rs:537:13
  51:     0x7fef4898b57c - {closure#0}<rustc_query_system::query::plumbing::execute_job_incr::{closure_env#2}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>, (rustc_middle::query::erase::Erased<[u8; 0]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_middle/src/ty/context/tls.rs:82:9
  52:     0x7fef4898b57c - try_with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_query_system::query::plumbing::execute_job_incr::{closure_env#2}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>, (rustc_middle::query::erase::Erased<[u8; 0]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>, (rustc_middle::query::erase::Erased<[u8; 0]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/thread/local.rs:283:12
  53:     0x7fef4898b57c - with<core::cell::Cell<*const ()>, rustc_middle::ty::context::tls::enter_context::{closure_env#0}<rustc_query_system::query::plumbing::execute_job_incr::{closure_env#2}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>, (rustc_middle::query::erase::Erased<[u8; 0]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>, (rustc_middle::query::erase::Erased<[u8; 0]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>
                               at /home/ywz/doctor/rust-doctor/rust/library/std/src/thread/local.rs:260:9
  54:     0x7fef48ab743c - enter_context<rustc_query_system::query::plumbing::execute_job_incr::{closure_env#2}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>, (rustc_middle::query::erase::Erased<[u8; 0]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_middle/src/ty/context/tls.rs:79:5
  55:     0x7fef48ab743c - {closure#0}<(rustc_middle::query::erase::Erased<[u8; 0]>, rustc_query_system::dep_graph::graph::DepNodeIndex), rustc_query_system::query::plumbing::execute_job_incr::{closure_env#2}<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>>
                               at /home/ywz/doctor/rust-doctor/rust/compiler/rustc_query_impl/src/plumbing.rs:151:13



rustc version: 1.83.0-dev
platform: x86_64-unknown-linux-gnu

query stack during panic:
#0 [check_liveness] checking liveness of variables in `utf8::<impl at regex-syntax/src/utf8.rs:336:1: 336:32>::next`
#1 [mir_built] building MIR for `utf8::<impl at regex-syntax/src/utf8.rs:336:1: 336:32>::next`
#2 [check_unsafety] unsafety-checking `utf8::<impl at regex-syntax/src/utf8.rs:336:1: 336:32>::next`
#3 [analysis] running analysis passes on this crate
end of query stack

@thomasyonug thomasyonug added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 17, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 17, 2024
@matthiaskrgr
Copy link
Member

#121623

@matthiaskrgr matthiaskrgr closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants