Skip to content

ICE when compiling regex 1.10.6 on latest nightly #135566

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

Closed
lopopolo opened this issue Jan 16, 2025 · 2 comments
Closed

ICE when compiling regex 1.10.6 on latest nightly #135566

lopopolo opened this issue Jan 16, 2025 · 2 comments
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

@lopopolo
Copy link
Contributor

Code

regex crate

Meta

rustc --version --verbose:

rustc 1.86.0-nightly (8361aef0d 2025-01-14)
binary: rustc
commit-hash: 8361aef0d7c29b1501a316a208ed84cd8a2ae5da
commit-date: 2025-01-14
host: x86_64-unknown-linux-gnu
release: 1.86.0-nightly
LLVM version: 19.1.6

Error output

thread 'rustc' panicked at /rustc/8361aef0d7c29b1501a316a208ed84cd8a2ae5da/compiler/rustc_type_ir/src/binder.rs:806:9:
const parameter `'a/#0` ('a/#0/0) out of range when instantiating args=[]
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>::region_param_out_of_range
   3: <rustc_middle::ty::generics::GenericPredicates>::instantiate_into
   4: rustc_trait_selection::traits::instantiate_and_check_impossible_predicates
      [... omitted 2 frames ...]
   5: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<(rustc_span::def_id::DefId, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>), rustc_middle::query::erase::Erased<[u8; 1]>>>
   6: rustc_monomorphize::partitioning::collect_and_partition_mono_items
      [... omitted 2 frames ...]
   7: rustc_codegen_ssa::back::symbol_export::exported_symbols_provider_local
      [... omitted 2 frames ...]
   8: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
   9: rustc_metadata::rmeta::encoder::encode_metadata
  10: rustc_metadata::fs::encode_and_write_metadata
  11: <rustc_interface::queries::Linker>::codegen_and_build_linker
  12: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  13: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/regex-1.10.6/rustc-ice-2025-01-15T12_03_23-3487.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=2 -C passes=sancov-module -C llvm-args=-sanitizer-coverage-level=4 -C llvm-args=-sanitizer-coverage-inline-8bit-counters -C llvm-args=-sanitizer-coverage-pc-table -C llvm-args=-sanitizer-coverage-trace-compares -C link-dead-code -Z sanitizer=address -C llvm-args=-sanitizer-coverage-stack-depth -C debug-assertions -C codegen-units=1

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [instantiate_and_check_impossible_predicates] checking impossible instantiated predicates: `regex::bytes::<impl at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/regex-1.10.6/src/regex/bytes.rs:1910:1: 1910:43>::fmt::CapturesDebugMap`
#1 [collect_and_partition_mono_items] collect_and_partition_mono_items
#2 [exported_symbols] collecting exported symbols for crate `0`
end of query stack
error: could not compile `regex` (lib)

Caused by:
  process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name regex --edition=2021 /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/regex-1.10.6/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 -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="perf"' --cfg 'feature="perf-backtrack"' --cfg 'feature="perf-cache"' --cfg 'feature="perf-dfa"' --cfg 'feature="perf-inline"' --cfg 'feature="perf-literal"' --cfg 'feature="perf-onepass"' --cfg 'feature="std"' --cfg 'feature="unicode"' --cfg 'feature="unicode-age"' --cfg 'feature="unicode-bool"' --cfg 'feature="unicode-case"' --cfg 'feature="unicode-gencat"' --cfg 'feature="unicode-perl"' --cfg 'feature="unicode-script"' --cfg 'feature="unicode-segment"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("default", "logging", "pattern", "perf", "perf-backtrack", "perf-cache", "perf-dfa", "perf-dfa-full", "perf-inline", "perf-literal", "perf-onepass", "std", "unicode", "unicode-age", "unicode-bool", "unicode-case", "unicode-gencat", "unicode-perl", "unicode-script", "unicode-segment", "unstable", "use_std"))' -C metadata=47fb8065ddb60af2 -C extra-filename=-23b8850dd094f75a --out-dir /home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/runner/work/artichoke/artichoke/fuzz/target/release/deps --extern aho_corasick=/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/deps/libaho_corasick-a3643a814fb8b39e.rmeta --extern memchr=/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/deps/libmemchr-aea230271f267d06.rmeta --extern regex_automata=/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/deps/libregex_automata-6ec2d483a35ccd5f.rmeta --extern regex_syntax=/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/deps/libregex_syntax-290920509c6ee32b.rmeta --cap-lints allow -Cpasses=sancov-module -Cllvm-args=-sanitizer-coverage-level=4 -Cllvm-args=-sanitizer-coverage-inline-8bit-counters -Cllvm-args=-sanitizer-coverage-pc-table -Cllvm-args=-sanitizer-coverage-trace-compares --cfg fuzzing -Clink-dead-code -Zsanitizer=address -Cllvm-args=-sanitizer-coverage-stack-depth -Cdebug-assertions -C codegen-units=1` (exit status: 101)
warning: build failed, waiting for other jobs to finish...
Error: failed to build fuzz script: ASAN_OPTIONS="detect_odr_violation=0" RUSTFLAGS="-Cpasses=sancov-module -Cllvm-args=-sanitizer-coverage-level=4 -Cllvm-args=-sanitizer-coverage-inline-8bit-counters -Cllvm-args=-sanitizer-coverage-pc-table -Cllvm-args=-sanitizer-coverage-trace-compares --cfg fuzzing -Clink-dead-code -Zsanitizer=address -Cllvm-args=-sanitizer-coverage-stack-depth -Cdebug-assertions -C codegen-units=1" "cargo" "build" "--manifest-path" "/home/runner/work/artichoke/artichoke/fuzz/Cargo.toml" "--target" "x86_64-unknown-linux-gnu" "--release" "--config" "profile.release.debug=true" "--bins"

Stack backtrace:
   0: anyhow::error::<impl anyhow::Error>::msg
   1: cargo_fuzz::project::FuzzProject::exec_build
   2: <cargo_fuzz::options::build::Build as cargo_fuzz::RunCommand>::run_command
   3: cargo_fuzz::main
   4: std::sys::backtrace::__rust_begin_short_backtrace
   5: std::rt::lang_start::{{closure}}
   6: std::rt::lang_start_internal
   7: main
   8: <unknown>
   9: __libc_start_main
  10: _start
Backtrace

<backtrace>

(Opening again since I accidentally closed #135564 and can't reopen it)

@lopopolo lopopolo 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 Jan 16, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 16, 2025
@cyrgani
Copy link
Contributor

cyrgani commented Jan 16, 2025

Probably a duplicate of #135515, which is fixed in the latest nightly.

@lqd
Copy link
Member

lqd commented Jan 16, 2025

Thanks for opening an issue!

PR #135520 has already fixed this problem, and is available in today's nightly, so we can close this. Feel free to reopen if it happens again.

@lqd lqd closed this as completed Jan 16, 2025
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 16, 2025
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

5 participants