{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/56762","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/56762/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/56762/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/56762/events","html_url":"https://github.com/rust-lang/rust/issues/56762","id":390478733,"node_id":"MDU6SXNzdWUzOTA0Nzg3MzM=","number":56762,"title":"ICE const fn: static eval failure didn't emit an error 1.32.0","user":{"login":"Orycterope","id":6343527,"node_id":"MDQ6VXNlcjYzNDM1Mjc=","avatar_url":"https://avatars0.githubusercontent.com/u/6343527?v=4","gravatar_id":"","url":"https://api.github.com/users/Orycterope","html_url":"https://github.com/Orycterope","followers_url":"https://api.github.com/users/Orycterope/followers","following_url":"https://api.github.com/users/Orycterope/following{/other_user}","gists_url":"https://api.github.com/users/Orycterope/gists{/gist_id}","starred_url":"https://api.github.com/users/Orycterope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Orycterope/subscriptions","organizations_url":"https://api.github.com/users/Orycterope/orgs","repos_url":"https://api.github.com/users/Orycterope/repos","events_url":"https://api.github.com/users/Orycterope/events{/privacy}","received_events_url":"https://api.github.com/users/Orycterope/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-13T01:22:39Z","updated_at":"2018-12-13T01:22:39Z","closed_at":null,"author_association":"NONE","body":"```rust \r\nconst HUGE_SIZE: usize = usize::max_value() / 8;\r\n\r\npub struct TooBigArray {\r\n    arr: [u8; HUGE_SIZE],\r\n}\r\n\r\nimpl TooBigArray {\r\n    pub const fn new() -> Self {\r\n        TooBigArray { arr: [0x00; HUGE_SIZE], }\r\n    }\r\n}\r\n\r\nstatic MY_TOO_BIG_ARRAY: TooBigArray = TooBigArray::new();\r\n\r\nfn main() {\r\n    println!(\"Hello, world!, {}\", MY_TOO_BIG_ARRAY.arr[0]);\r\n}\r\n```\r\n\r\nGives:\r\n\r\n```\r\nerror: internal compiler error: src/librustc_mir/const_eval.rs:698: static eval failure didn't emit an error: Reported\r\n  --> src/main.rs:13:1\r\n   |\r\n13 | static MY_TOO_BIG_ARRAY: TooBigArray = TooBigArray::new();\r\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nthread 'main' panicked at 'Box<Any>', src/librustc_errors/lib.rs:538:9\r\n```\r\n<details>\r\n<summary>Backtrace</summary>\r\n\r\n```\r\nthread 'main' panicked at 'Box<Any>', src/librustc_errors/lib.rs:538:9\r\nstack backtrace:\r\n   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace\r\n             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49\r\n   1: std::sys_common::backtrace::_print\r\n             at src/libstd/sys_common/backtrace.rs:71\r\n   2: std::panicking::default_hook::{{closure}}\r\n             at src/libstd/sys_common/backtrace.rs:59\r\n             at src/libstd/panicking.rs:210\r\n   3: std::panicking::default_hook\r\n             at src/libstd/panicking.rs:224\r\n   4: rustc::util::common::panic_hook\r\n   5: std::panicking::rust_panic_with_hook\r\n             at src/libstd/panicking.rs:491\r\n   6: std::panicking::begin_panic\r\n   7: rustc_errors::Handler::span_bug\r\n   8: rustc::util::bug::opt_span_bug_fmt::{{closure}}\r\n   9: rustc::ty::context::tls::with_opt::{{closure}}\r\n  10: rustc::ty::context::tls::with_context_opt\r\n  11: rustc::ty::context::tls::with_opt\r\n  12: rustc::util::bug::opt_span_bug_fmt\r\n  13: rustc::util::bug::span_bug_fmt\r\n  14: rustc_mir::const_eval::const_eval_raw_provider\r\n  15: rustc::ty::query::__query_compute::const_eval_raw\r\n  16: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::const_eval_raw<'tcx>>::compute\r\n  17: rustc::ty::context::tls::with_context\r\n  18: rustc::dep_graph::graph::DepGraph::with_task_impl\r\n  19: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start\r\n  20: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job\r\n  21: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query\r\n  22: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::const_eval_raw\r\n  23: rustc_mir::const_eval::const_eval_provider\r\n  24: rustc::ty::query::__query_compute::const_eval\r\n  25: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::const_eval<'tcx>>::compute\r\n  26: rustc::ty::context::tls::with_context\r\n  27: rustc::dep_graph::graph::DepGraph::with_task_impl\r\n  28: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start\r\n  29: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job\r\n  30: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query\r\n  31: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::const_eval\r\n  32: rustc_mir::const_eval::const_eval_provider\r\n  33: rustc::ty::query::__query_compute::const_eval\r\n  34: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::const_eval<'tcx>>::compute\r\n  35: rustc::ty::context::tls::with_context\r\n  36: rustc::dep_graph::graph::DepGraph::with_task_impl\r\n  37: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start\r\n  38: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job\r\n  39: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query\r\n  40: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::const_eval\r\n  41: rustc_lint::builtin::check_const\r\n  42: <rustc_lint::register_builtins::BuiltinCombinedLateLintPass as rustc::lint::LateLintPass<'a, 'tcx>>::check_item\r\n  43: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item\r\n  44: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_mod\r\n  45: rustc::hir::intravisit::walk_crate\r\n  46: rustc::lint::context::check_crate\r\n  47: rustc::util::common::time\r\n  48: rustc::ty::context::tls::enter_context\r\n  49: <std::thread::local::LocalKey<T>>::with\r\n  50: rustc::ty::context::TyCtxt::create_and_enter\r\n  51: rustc_driver::driver::compile_input\r\n  52: rustc_driver::run_compiler_with_pool\r\n  53: <scoped_tls::ScopedKey<T>>::set\r\n  54: rustc_driver::run_compiler\r\n  55: rustc_driver::monitor::{{closure}}\r\n  56: __rust_maybe_catch_panic\r\n             at src/libpanic_unwind/lib.rs:102\r\n  57: rustc_driver::run\r\n  58: rustc_driver::main\r\n  59: std::rt::lang_start::{{closure}}\r\n  60: std::panicking::try::do_call\r\n             at src/libstd/rt.rs:59\r\n             at src/libstd/panicking.rs:306\r\n  61: __rust_maybe_catch_panic\r\n             at src/libpanic_unwind/lib.rs:102\r\n  62: std::rt::lang_start_internal\r\n             at src/libstd/panicking.rs:285\r\n             at src/libstd/panic.rs:398\r\n             at src/libstd/rt.rs:58\r\n  63: main\r\n  64: __libc_start_main\r\n  65: <unknown>\r\nquery stack during panic:\r\n#0 [const_eval_raw] const-evaluating `MY_TOO_BIG_ARRAY`\r\n#1 [const_eval] const-evaluating + checking `MY_TOO_BIG_ARRAY`\r\n#2 [const_eval] const-evaluating + checking `MY_TOO_BIG_ARRAY`\r\nend of query stack\r\nerror: aborting due to previous error\r\n\r\n\r\nnote: the compiler unexpectedly panicked. this is a bug.\r\n\r\nnote: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports\r\n\r\nnote: rustc 1.32.0-nightly (4a45578bc 2018-12-07) running on x86_64-unknown-linux-gnu\r\n\r\nnote: compiler flags: -C debuginfo=2 -C incremental --crate-type bin\r\n\r\nnote: some of the compiler flags provided by cargo are hidden\r\n\r\nerror: Could not compile `rustc-ice`.\r\n\r\nTo learn more, run the command again with --verbose.\r\n```\r\n</details>"}}
{"actor":{"display_login":"Orycterope"}}