Skip to content

ICE: no errors encountered even though delay_span_bug issued #116809

Not planned
@jyn514

Description

@jyn514

i am so sorry

@estebank this bit in particular looks wrong, probably it needs to omit the colon on windows?

warning: the ICE couldn't be written to `C:\Users\jyn\src\cursed\rustc-ice-2023-10-16T17:45:34.3766412Z-2188.txt`: The filename, directory name, or volume label syntax is incorrect. (os error 123)

Code

#![feature(no_core, lang_items, start)]
#![allow(internal_features, non_snake_case)]
#![no_core]

#[lang = "sized"]
trait Sized {}
#[lang = "copy"]
trait Copy {}

#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
	0
}

#[cfg(target_env = "msvc")]
#[no_mangle]
fn mainCRTStartup() -> isize {
	main(0, null_mut()) as _
}

fn null_mut<T>() -> *mut T {
	0 as _
}

Meta

rustc --version --verbose:

rustc 1.75.0-nightly (42b1224e9 2023-10-15) running on x86_64-pc-windows-msvc

Error output

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: error performing ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: ProvePredicate { predicate: Binder { value: TraitPredicate(<isize as Copy>, polarity:Positive), bound_vars: [] } } }
  --> src\main.rs:48:2
   |
48 |     main(0, null_mut()) as _
   |     ^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: delayed at /rustc/42b1224e9eb37177f608d3f6a6f2be2ee13902e4\compiler\rustc_trait_selection\src\traits\query\type_op\mod.rs:163:36
  --> src\main.rs:48:2
   |
48 |     main(0, null_mut()) as _
   |     ^^^^^^^^^^^^^^^^^^^^^^^^

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

warning: the ICE couldn't be written to `C:\Users\jyn\src\cursed\rustc-ice-2023-10-16T17:45:34.3766412Z-2188.txt`: The filename, directory name, or volume label syntax is incorrect. (os error 123)

note: rustc 1.75.0-nightly (42b1224e9 2023-10-15) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
error: could not compile `cursed` (bin "cursed")
Backtrace

note: delayed at /rustc/42b1224e9eb37177f608d3f6a6f2be2ee13902e4\compiler\rustc_trait_selection\src\traits\query\type_op\mod.rs:163:36
         0: std::backtrace::Backtrace::disabled
         1: std::backtrace::Backtrace::capture
         2: <rustc_errors::HandlerInner>::emit_diagnostic
         3: <rustc_borrowck::renumber::RegionRenumberer as rustc_middle::mir::visit::MutVisitor>::visit_constant
         4: <rustc_borrowck::member_constraints::MemberConstraintSet<rustc_middle::ty::sty::RegionVid> as core::default::Default>::default
         5: <rustc_borrowck::type_check::TypeVerifier as rustc_middle::mir::visit::Visitor>::visit_place
         6: <rustc_borrowck::region_infer::values::PointIndex as core::ops::arith::Add<usize>>::add
         7: <rustc_borrowck::type_check::TypeVerifier as rustc_middle::mir::visit::Visitor>::visit_body
         8: <rustc_borrowck::borrow_set::BorrowSet>::get_index_of
         9: <polonius_engine::facts::AllFacts<rustc_borrowck::facts::RustcFacts> as rustc_borrowck::facts::AllFactsExt>::enabled
        10: <rustc_borrowck::MirBorrowckCtxt>::consume_operand
        11: <rustc_middle::ty::adjustment::AutoBorrowMutability as rustc_mir_build::thir::cx::expr::ToBorrowKind>::to_borrow_kind
        12: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::load_side_effects
        13: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::load_side_effects
        14: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::load_side_effects
        15: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::load_side_effects
        16: once_cell::imp::initialize_or_wait
        17: time_core::util::is_leap_year
        18: rustc_interface::passes::analysis
        19: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        20: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        21: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        22: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        23: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
        24: <rustc_middle::ty::SymbolName as core::fmt::Debug>::fmt
        25: <rustc_middle::ty::SymbolName as core::fmt::Debug>::fmt
        26: rustc_driver_impl::main
        27: <rustc_middle::ty::SymbolName as core::fmt::Debug>::fmt
        28: <rustc_middle::ty::SymbolName as core::fmt::Debug>::fmt
        29: std::sys::windows::thread::Thread::new
        30: BaseThreadInitThunk
        31: RtlUserThreadStart

@rustbot label +O-windows

Activity

added
C-bugCategory: This is a bug.
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Oct 16, 2023
added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
O-windowsOperating system: Windows
on Oct 16, 2023
jyn514

jyn514 commented on Oct 16, 2023

@jyn514
MemberAuthor

note that removing the unnecessary as _ makes this compile

changed the title [-]delay_span_bug: error performing ParamEnvAnd: ICE couldn't be written[/-] [+]ICE couldn't be written[/+] on Oct 16, 2023
removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Oct 16, 2023
added a commit that references this issue on Oct 16, 2023
8a2a747
self-assigned this
on Oct 16, 2023
estebank

estebank commented on Oct 16, 2023

@estebank
Contributor

Modifying this ticket to only cover the delay_span_bug, while #115180 covers only the windows path issue.

changed the title [-]ICE couldn't be written[/-] [+]ICE: no errors encountered even though `delay_span_bug` issued[/+] on Oct 16, 2023
jyn514

jyn514 commented on Oct 16, 2023

@jyn514
MemberAuthor

@estebank my understanding is the policy for no_core ICEs is WONTFIX, so probably this should just be closed

added 3 commits that reference this issue on Oct 16, 2023
74e17b4
bb943af
e1aa5ad
added a commit that references this issue on Oct 18, 2023

Auto merge of rust-lang#116814 - estebank:windows-ice-path, r=petroch…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @estebank@jyn514@rustbot@Noratrieb

      Issue actions

        ICE: no errors encountered even though `delay_span_bug` issued · Issue #116809 · rust-lang/rust