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: attempt to add with overflow', src/librustc_errors/emitter.rs:128:29 #72509

Closed
matthiaskrgr opened this issue May 23, 2020 · 0 comments · Fixed by #73719
Closed

ICE: attempt to add with overflow', src/librustc_errors/emitter.rs:128:29 #72509

matthiaskrgr opened this issue May 23, 2020 · 0 comments · Fixed by #73719
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

rustc build config

[llvm]
release-debuginfo = true
assertions = true
ninja = true
targets = "AArch64;ARM;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86"
link-jobs = 2
[build]
extended = true
tools = ["cargo", "rls", "clippy", "rustfmt", "analysis", "src"]
sanitizers = false
profiler = true
[install]
[rust]
debug = true
codegen-units = 0
debug-assertions = true
debuginfo-level = 1
backtrace-on-ice = true
verify-llvm-ir = true
[target.x86_64-unknown-linux-gnu]
ar = "llvm-ar"
ranlib = "llvm-ranlib"
[dist]

When I use the resulting rustc and run my crashfinder which runs
RUST_BACKTRACE=full "build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "./src/librustc_ast_lowering/pat.rs" "-Zmir-opt-level=3" "--emit" "mir" "-Zsave-analysis" "-o" "/dev/null" "-Zdump-mir-dir=/dev/null"
I get the following crash:

...
    --> ./src/librustc_ast_lowering/lib.rs:1054:25
     |
1054 |                         ExpnId::root(),
     |                         ^^^^^^ use of undeclared type or module `ExpnId`

thread 'rustc' panicked at 'attempt to add with overflow', src/librustc_errors/emitter.rs:128:29
stack backtrace:

However I have not managed to reproduce this by executing the command in the command line for some reason :/

Meta

rustc is @ 75b0a68

Backtrace

error[E0433]: failed to resolve: use of undeclared type or module `AssocTyConstraintKind`
    --> ./src/librustc_ast_lowering/lib.rs:1003:13
     |
1003 |             AssocTyConstraintKind::Bound { ref bounds } => {
     |             ^^^^^^^^^^^^^^^^^^^^^ use of undeclared type or module `AssocTyConstraintKind`

error[E0433]: failed to resolve: use of undeclared type or module `DefPathData`
    --> ./src/librustc_ast_lowering/lib.rs:1053:25
     |
1053 |                         DefPathData::ImplTrait,
     |                         ^^^^^^^^^^^ use of undeclared type or module `DefPathData`

error[E0433]: failed to resolve: use of undeclared type or module `ExpnId`
    --> ./src/librustc_ast_lowering/lib.rs:1054:25
     |
1054 |                         ExpnId::root(),
     |                         ^^^^^^ use of undeclared type or module `ExpnId`

thread 'rustc' panicked at 'attempt to add with overflow', src/librustc_errors/emitter.rs:128:29
stack backtrace:
   0:     0x7fba006bc048 - backtrace::backtrace::libunwind::trace::haacdbe56423d021f
                               at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1:     0x7fba006bc048 - backtrace::backtrace::trace_unsynchronized::h0c7750ae09eb64cd
                               at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2:     0x7fba006bc048 - std::sys_common::backtrace::_print_fmt::hf15d2b1ccf36b88d
                               at src/libstd/sys_common/backtrace.rs:78
   3:     0x7fba006bc048 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h382de45f057b70ea
                               at src/libstd/sys_common/backtrace.rs:59
   4:     0x7fba0072782c - core::fmt::write::h60305e675ec35c15
                               at src/libcore/fmt/mod.rs:1069
   5:     0x7fba006a5b80 - std::io::Write::write_fmt::h8870b1c93c7af963
                               at src/libstd/io/mod.rs:1537
   6:     0x7fba006bbddb - std::sys_common::backtrace::_print::h3b3e29336d7b99e6
                               at src/libstd/sys_common/backtrace.rs:62
   7:     0x7fba006bbddb - std::sys_common::backtrace::print::h168c43c984d3d677
                               at src/libstd/sys_common/backtrace.rs:49
   8:     0x7fba006eea2b - std::panicking::default_hook::{{closure}}::h4531228facde7af0
                               at src/libstd/panicking.rs:198
   9:     0x7fba006ee744 - std::panicking::default_hook::h6c8e2af13b4fc8dd
                               at src/libstd/panicking.rs:218
  10:     0x7fba0352a8fd - <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call::h485ef1572bb02b7d
                               at /home/matthias/vcs/github/rust_debug_assertions/src/liballoc/boxed.rs:1071
  11:     0x7fba0352a8fd - rustc_driver::report_ice::hb2ed0a1db8758413
                               at src/librustc_driver/lib.rs:1167
  12:     0x7fba006ef4cf - std::panicking::rust_panic_with_hook::h80195e43d269b3dd
                               at src/libstd/panicking.rs:490
  13:     0x7fba006eedbb - rust_begin_unwind
                               at src/libstd/panicking.rs:388
  14:     0x7fba0071dee1 - core::panicking::panic_fmt::h00a353c725ef18d2
                               at src/libcore/panicking.rs:101
  15:     0x7fba0071de2d - core::panicking::panic::hc99761202df196cd
                               at src/libcore/panicking.rs:56
  16:     0x7fba0903e43f - rustc_errors::emitter::Margin::was_cut_right::hb2794ea777a0dafe
                               at src/librustc_errors/emitter.rs:128
  17:     0x7fba0903e43f - rustc_errors::emitter::EmitterWriter::draw_line::hdfe7ed1b627db586
                               at src/librustc_errors/emitter.rs:656
  18:     0x7fba09041e5d - rustc_errors::emitter::EmitterWriter::render_source_line::h0cb591e7310a7093
                               at src/librustc_errors/emitter.rs:707
  19:     0x7fba09041e5d - rustc_errors::emitter::EmitterWriter::emit_message_default::hc7d1e8bfdf66b5cb
                               at src/librustc_errors/emitter.rs:1437
  20:     0x7fba09045deb - rustc_errors::emitter::EmitterWriter::emit_messages_default::he0ca0b7575c56ce4
                               at src/librustc_errors/emitter.rs:1697
  21:     0x7fba0903d72e - <rustc_errors::emitter::EmitterWriter as rustc_errors::emitter::Emitter>::emit_diagnostic::hedccca516950e215
                               at src/librustc_errors/emitter.rs:484
  22:     0x7fba0902d89d - rustc_errors::HandlerInner::emit_diagnostic::hadf99473a2bded94
                               at src/librustc_errors/lib.rs:753
  23:     0x7fba09062080 - rustc_errors::Handler::emit_diagnostic::h06c584372ab4cf13
                               at src/librustc_errors/lib.rs:695
  24:     0x7fba09062080 - rustc_errors::diagnostic_builder::DiagnosticBuilder::emit::hb012be4fc836b0b9
                               at src/librustc_errors/diagnostic_builder.rs:100
  25:     0x7fba068903f2 - rustc_resolve::diagnostics::<impl rustc_resolve::Resolver>::report_error::h8540dc1a2f2ea8b5
                               at src/librustc_resolve/diagnostics.rs:88
  26:     0x7fba0696a6e7 - rustc_resolve::late::LateResolutionVisitor::resolve_qpath::h7750342f380a6b37
                               at src/librustc_resolve/late.rs:1841
  27:     0x7fba0696897e - rustc_resolve::late::LateResolutionVisitor::resolve_qpath_anywhere::h7653056f49fd8aff
                               at src/librustc_resolve/late.rs:1718
  28:     0x7fba0696897e - rustc_resolve::late::LateResolutionVisitor::smart_resolve_path_fragment::h3cb7e4f6e9aa1ba2
                               at src/librustc_resolve/late.rs:1631
  29:     0x7fba0696b905 - rustc_resolve::late::LateResolutionVisitor::smart_resolve_path::hac96c3b57bfb6e39
                               at src/librustc_resolve/late.rs:1598
  30:     0x7fba0696b905 - rustc_resolve::late::LateResolutionVisitor::resolve_expr::hcf51f390259e6943
                               at src/librustc_resolve/late.rs:1948
  31:     0x7fba0696b94e - rustc_resolve::late::LateResolutionVisitor::resolve_expr::hcf51f390259e6943
                               at src/librustc_resolve/late.rs:2043
  32:     0x7fba06815ada - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_expr::ha47c837da38794cc
                               at src/librustc_resolve/late.rs:403
  33:     0x7fba06815ada - rustc_ast::visit::walk_field::h934ac0ec90e9c075
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:381
  34:     0x7fba068246ff - rustc_ast::visit::Visitor::visit_field::ha688fac097990770
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:226
  35:     0x7fba068246ff - rustc_ast::visit::walk_expr::h1c92a3d4713d428c
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:237
  36:     0x7fba0696c0ba - rustc_resolve::late::LateResolutionVisitor::resolve_expr::hcf51f390259e6943
                               at src/librustc_resolve/late.rs:0
  37:     0x7fba0696c0ba - rustc_resolve::late::LateResolutionVisitor::resolve_expr::hcf51f390259e6943
                               at src/librustc_resolve/late.rs:0
  38:     0x7fba0696ba2e - rustc_resolve::late::LateResolutionVisitor::resolve_expr::hcf51f390259e6943
                               at src/librustc_resolve/late.rs:2037
  39:     0x7fba0695345d - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_expr::ha47c837da38794cc
                               at src/librustc_resolve/late.rs:403
  40:     0x7fba0695345d - rustc_resolve::late::LateResolutionVisitor::resolve_local::h4296ca39d8f3d6e7
                               at src/librustc_resolve/late.rs:1234
  41:     0x7fba0695345d - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_local::h48040c7eb865e3d4
                               at src/librustc_resolve/late.rs:416
  42:     0x7fba069525d6 - rustc_ast::visit::walk_stmt::h9e3425e066ff8e3a
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:683
  43:     0x7fba069525d6 - rustc_ast::visit::Visitor::visit_stmt::h124a0c0ca8004bd0
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:103
  44:     0x7fba069525d6 - rustc_resolve::late::LateResolutionVisitor::resolve_block::h3dc991e6dbdfc0fa
                               at src/librustc_resolve/late.rs:1923
  45:     0x7fba069525d6 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_block::hbb85937225dd0e67
                               at src/librustc_resolve/late.rs:394
  46:     0x7fba0696c09f - rustc_resolve::late::LateResolutionVisitor::resolve_expr::hcf51f390259e6943
                               at src/librustc_resolve/late.rs:0
  47:     0x7fba06955500 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_expr::ha47c837da38794cc
                               at src/librustc_resolve/late.rs:403
  48:     0x7fba06955500 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_fn::{{closure}}::{{closure}}::h82e57fe847f28a55
                               at src/librustc_resolve/late.rs:485
  49:     0x7fba06955500 - rustc_resolve::late::LateResolutionVisitor::with_label_rib::hc4aa964a25de7639
                               at src/librustc_resolve/late.rs:980
  50:     0x7fba06955500 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_fn::{{closure}}::hb77cfd3f7b01d7e2
                               at src/librustc_resolve/late.rs:476
  51:     0x7fba06955500 - rustc_resolve::late::LateResolutionVisitor::with_rib::h400b24c8d33ccce3
                               at src/librustc_resolve/late.rs:694
  52:     0x7fba06955500 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_fn::hd1bb330120bc6dc5
                               at src/librustc_resolve/late.rs:474
  53:     0x7fba06824024 - rustc_ast::visit::walk_expr::h1c92a3d4713d428c
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:773
  54:     0x7fba0696c0ba - rustc_resolve::late::LateResolutionVisitor::resolve_expr::hcf51f390259e6943
                               at src/librustc_resolve/late.rs:0
  55:     0x7fba0696ba2e - rustc_resolve::late::LateResolutionVisitor::resolve_expr::hcf51f390259e6943
                               at src/librustc_resolve/late.rs:2037
  56:     0x7fba069525c0 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_expr::ha47c837da38794cc
                               at src/librustc_resolve/late.rs:403
  57:     0x7fba069525c0 - rustc_ast::visit::walk_stmt::h9e3425e066ff8e3a
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:685
  58:     0x7fba069525c0 - rustc_ast::visit::Visitor::visit_stmt::h124a0c0ca8004bd0
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:103
  59:     0x7fba069525c0 - rustc_resolve::late::LateResolutionVisitor::resolve_block::h3dc991e6dbdfc0fa
                               at src/librustc_resolve/late.rs:1923
  60:     0x7fba069525c0 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_block::hbb85937225dd0e67
                               at src/librustc_resolve/late.rs:394
  61:     0x7fba0696c029 - rustc_resolve::late::LateResolutionVisitor::resolve_expr::{{closure}}::hb6241dc1398e4b03
                               at src/librustc_resolve/late.rs:2001
  62:     0x7fba0696c029 - rustc_resolve::late::LateResolutionVisitor::with_rib::he4ee6ef256e3aec7
                               at src/librustc_resolve/late.rs:694
  63:     0x7fba0696c029 - rustc_resolve::late::LateResolutionVisitor::resolve_expr::hcf51f390259e6943
                               at src/librustc_resolve/late.rs:1999
  64:     0x7fba069525c0 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_expr::ha47c837da38794cc
                               at src/librustc_resolve/late.rs:403
  65:     0x7fba069525c0 - rustc_ast::visit::walk_stmt::h9e3425e066ff8e3a
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:685
  66:     0x7fba069525c0 - rustc_ast::visit::Visitor::visit_stmt::h124a0c0ca8004bd0
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:103
  67:     0x7fba069525c0 - rustc_resolve::late::LateResolutionVisitor::resolve_block::h3dc991e6dbdfc0fa
                               at src/librustc_resolve/late.rs:1923
  68:     0x7fba069525c0 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_block::hbb85937225dd0e67
                               at src/librustc_resolve/late.rs:394
  69:     0x7fba0696c09f - rustc_resolve::late::LateResolutionVisitor::resolve_expr::hcf51f390259e6943
                               at src/librustc_resolve/late.rs:0
  70:     0x7fba06951bd8 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_expr::ha47c837da38794cc
                               at src/librustc_resolve/late.rs:403
  71:     0x7fba06951bd8 - rustc_resolve::late::LateResolutionVisitor::resolve_arm::{{closure}}::hdebb96f552bd807f
                               at src/librustc_resolve/late.rs:1362
  72:     0x7fba06951bd8 - rustc_resolve::late::LateResolutionVisitor::with_rib::h273567f64cf6ba45
                               at src/librustc_resolve/late.rs:694
  73:     0x7fba06951bd8 - rustc_resolve::late::LateResolutionVisitor::resolve_arm::hccf4b3c517ef3f28
                               at src/librustc_resolve/late.rs:1359
  74:     0x7fba06951bd8 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_arm::ha1331d9f1382ea32
                               at src/librustc_resolve/late.rs:391
  75:     0x7fba0682442c - rustc_ast::visit::walk_expr::h1c92a3d4713d428c
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:237
  76:     0x7fba0696c0ba - rustc_resolve::late::LateResolutionVisitor::resolve_expr::hcf51f390259e6943
                               at src/librustc_resolve/late.rs:0
  77:     0x7fba0695345d - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_expr::ha47c837da38794cc
                               at src/librustc_resolve/late.rs:403
  78:     0x7fba0695345d - rustc_resolve::late::LateResolutionVisitor::resolve_local::h4296ca39d8f3d6e7
                               at src/librustc_resolve/late.rs:1234
  79:     0x7fba0695345d - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_local::h48040c7eb865e3d4
                               at src/librustc_resolve/late.rs:416
  80:     0x7fba069525d6 - rustc_ast::visit::walk_stmt::h9e3425e066ff8e3a
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:683
  81:     0x7fba069525d6 - rustc_ast::visit::Visitor::visit_stmt::h124a0c0ca8004bd0
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:103
  82:     0x7fba069525d6 - rustc_resolve::late::LateResolutionVisitor::resolve_block::h3dc991e6dbdfc0fa
                               at src/librustc_resolve/late.rs:1923
  83:     0x7fba069525d6 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_block::hbb85937225dd0e67
                               at src/librustc_resolve/late.rs:394
  84:     0x7fba069557de - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_fn::{{closure}}::{{closure}}::h82e57fe847f28a55
                               at src/librustc_resolve/late.rs:484
  85:     0x7fba069557de - rustc_resolve::late::LateResolutionVisitor::with_label_rib::hc4aa964a25de7639
                               at src/librustc_resolve/late.rs:980
  86:     0x7fba069557de - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_fn::{{closure}}::hb77cfd3f7b01d7e2
                               at src/librustc_resolve/late.rs:476
  87:     0x7fba069557de - rustc_resolve::late::LateResolutionVisitor::with_rib::h400b24c8d33ccce3
                               at src/librustc_resolve/late.rs:694
  88:     0x7fba069557de - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_fn::hd1bb330120bc6dc5
                               at src/librustc_resolve/late.rs:474
  89:     0x7fba06818f4e - rustc_ast::visit::walk_assoc_item::h4651fdf116917dde
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:651
  90:     0x7fba06962df8 - rustc_resolve::late::LateResolutionVisitor::resolve_implementation::{{closure}}::{{closure}}::{{closure}}::{{closure}}::{{closure}}::{{closure}}::{{closure}}::hba1b5eb16432e0a1
                               at src/librustc_resolve/late.rs:1151
  91:     0x7fba06962df8 - rustc_resolve::late::LateResolutionVisitor::with_generic_param_rib::h762073e2382fe8ac
                               at src/librustc_resolve/late.rs:972
  92:     0x7fba06962df8 - rustc_resolve::late::LateResolutionVisitor::resolve_implementation::{{closure}}::{{closure}}::{{closure}}::{{closure}}::{{closure}}::{{closure}}::hacedbfce3c00c4ee
                               at src/librustc_resolve/late.rs:1138
  93:     0x7fba06962df8 - rustc_resolve::late::LateResolutionVisitor::with_self_rib_ns::h27717fd13de94494
                               at src/librustc_resolve/late.rs:1081
  94:     0x7fba06962df8 - rustc_resolve::late::LateResolutionVisitor::resolve_implementation::{{closure}}::{{closure}}::{{closure}}::{{closure}}::{{closure}}::h2539042d3a18168b
                               at src/librustc_resolve/late.rs:1116
  95:     0x7fba06962df8 - rustc_resolve::late::LateResolutionVisitor::with_current_self_type::h34bfda1ebd2aaa6b
                               at src/librustc_resolve/late.rs:1000
  96:     0x7fba06962df8 - rustc_resolve::late::LateResolutionVisitor::resolve_implementation::{{closure}}::{{closure}}::{{closure}}::{{closure}}::hf01acf8f531dfa1d
                               at src/librustc_resolve/late.rs:1115
  97:     0x7fba06962df8 - rustc_resolve::late::LateResolutionVisitor::with_self_rib_ns::hb23dda25194609ff
                               at src/librustc_resolve/late.rs:1081
  98:     0x7fba06962df8 - rustc_resolve::late::LateResolutionVisitor::with_self_rib::hce2fc9961d1b780a
                               at src/librustc_resolve/late.rs:1086
  99:     0x7fba06962df8 - rustc_resolve::late::LateResolutionVisitor::resolve_implementation::{{closure}}::{{closure}}::{{closure}}::hc96edbbfb3675cd3
                               at src/librustc_resolve/late.rs:1105
 100:     0x7fba06962df8 - rustc_resolve::late::LateResolutionVisitor::with_optional_trait_ref::hbe965f3bf4ac0f3a
                               at src/librustc_resolve/late.rs:1070
 101:     0x7fba0695bd91 - rustc_resolve::late::LateResolutionVisitor::resolve_implementation::{{closure}}::{{closure}}::hc689969d54e57162
                               at src/librustc_resolve/late.rs:1103
 102:     0x7fba0695bd91 - rustc_resolve::late::LateResolutionVisitor::with_self_rib_ns::h88a5cb599d087b5a
                               at src/librustc_resolve/late.rs:1081
 103:     0x7fba0695bd91 - rustc_resolve::late::LateResolutionVisitor::with_self_rib::h6910deac98c1ab4d
                               at src/librustc_resolve/late.rs:1086
 104:     0x7fba0695bd91 - rustc_resolve::late::LateResolutionVisitor::resolve_implementation::{{closure}}::hd4b18be633907c94
                               at src/librustc_resolve/late.rs:1101
 105:     0x7fba0695bd91 - rustc_resolve::late::LateResolutionVisitor::with_generic_param_rib::h8c2134a4913e613a
                               at src/librustc_resolve/late.rs:972
 106:     0x7fba0695bd91 - rustc_resolve::late::LateResolutionVisitor::resolve_implementation::hcc4b81e136dcd827
                               at src/librustc_resolve/late.rs:1099
 107:     0x7fba0695bd91 - rustc_resolve::late::LateResolutionVisitor::resolve_item::he7b7bfcd3ff200e4
                               at src/librustc_resolve/late.rs:826
 108:     0x7fba06951934 - <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_item::h79b0628cfbf60ffa
                               at src/librustc_resolve/late.rs:387
 109:     0x7fba0681564b - rustc_ast::visit::walk_mod::ha4ba7b4d1b9a9016
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:237
 110:     0x7fba0681564b - rustc_ast::visit::Visitor::visit_mod::he95838505be2f9fd
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:85
 111:     0x7fba0681564b - rustc_ast::visit::walk_crate::ha69af164cd0b54aa
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/visit.rs:252
 112:     0x7fba068af64b - rustc_resolve::late::<impl rustc_resolve::Resolver>::late_resolve_crate::h9cff6fd262aab0fb
                               at src/librustc_resolve/late.rs:2223
 113:     0x7fba068af64b - rustc_resolve::Resolver::resolve_crate::hbc630e897d9a3dac
                               at src/librustc_resolve/lib.rs:1352
 114:     0x7fba038ef46f - rustc_interface::passes::configure_and_expand_inner::h77b66a5506f2c1b6
                               at src/librustc_interface/passes.rs:409
 115:     0x7fba03965d39 - rustc_interface::passes::configure_and_expand::{{closure}}::ha6abcbea9027f9b0
                               at src/librustc_interface/passes.rs:114
 116:     0x7fba0391a890 - alloc::boxed::<impl core::ops::generator::Generator<R> for core::pin::Pin<alloc::boxed::Box<G>>>::resume::h03242be6e16e2418
                               at /home/matthias/vcs/github/rust_debug_assertions/src/liballoc/boxed.rs:1164
 117:     0x7fba0391a890 - rustc_data_structures::box_region::PinnedGenerator<I,A,R>::new::hce4d7305faa2c7f0
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_data_structures/box_region.rs:44
 118:     0x7fba038e97ce - rustc_interface::passes::BoxedResolver::new::h4fa2fb88469540d8
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_data_structures/box_region.rs:101
 119:     0x7fba038e97ce - rustc_interface::passes::configure_and_expand::h48609084ddc26507
                               at src/librustc_interface/passes.rs:110
 120:     0x7fba0396a5c4 - rustc_interface::queries::Queries::expansion::{{closure}}::hfd91b391ac5384b7
                               at src/librustc_interface/queries.rs:176
 121:     0x7fba0396a5c4 - rustc_interface::queries::Query<T>::compute::h8ae68af739bb6b72
                               at src/librustc_interface/queries.rs:34
 122:     0x7fba0396a5c4 - rustc_interface::queries::Queries::expansion::h4bdc9b1293bc757b
                               at src/librustc_interface/queries.rs:172
 123:     0x7fba03538ff8 - rustc_driver::run_compiler::{{closure}}::{{closure}}::h90f094cd18da6acf
                               at src/librustc_driver/lib.rs:334
 124:     0x7fba03538ff8 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::ha3382e4c4385d85e
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_interface/queries.rs:385
 125:     0x7fba03538ff8 - rustc_driver::run_compiler::{{closure}}::hfed4c02aa29eddaa
                               at src/librustc_driver/lib.rs:283
 126:     0x7fba03538ff8 - rustc_interface::interface::run_compiler_in_existing_thread_pool::ha67ecacf0884a39e
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_interface/interface.rs:199
 127:     0x7fba034c2c12 - rustc_interface::interface::run_compiler::{{closure}}::hdac36ffe8467fb28
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_interface/interface.rs:213
 128:     0x7fba034c2c12 - rustc_interface::util::spawn_thread_pool::{{closure}}::{{closure}}::{{closure}}::h92f0dd7aa569ac3f
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_interface/util.rs:149
 129:     0x7fba034c2c12 - scoped_tls::ScopedKey<T>::set::hd8767c7db62df0fa
                               at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137
 130:     0x7fba034c2c12 - rustc_interface::util::spawn_thread_pool::{{closure}}::{{closure}}::h6d760f8b6b7b17c7
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_interface/util.rs:145
 131:     0x7fba034c2c12 - scoped_tls::ScopedKey<T>::set::he7c89be9cc14211f
                               at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137
 132:     0x7fba034c2c12 - rustc_ast::attr::with_globals::{{closure}}::hf2e205e815bfc146
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/attr/mod.rs:44
 133:     0x7fba034c2c12 - scoped_tls::ScopedKey<T>::set::h8f0f0dbf63852b4a
                               at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137
 134:     0x7fba034c2c12 - rustc_ast::attr::with_globals::h7b5c7170dfa16fa3
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_ast/attr/mod.rs:44
 135:     0x7fba034c2c12 - rustc_interface::util::spawn_thread_pool::{{closure}}::h88445c25e640ec6e
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_interface/util.rs:144
 136:     0x7fba034c2c12 - rustc_interface::util::scoped_thread::{{closure}}::hb4b576cf33b54fa9
                               at /home/matthias/vcs/github/rust_debug_assertions/src/librustc_interface/util.rs:119
 137:     0x7fba034c2c12 - std::sys_common::backtrace::__rust_begin_short_backtrace::h04460e9e0882296c
                               at /home/matthias/vcs/github/rust_debug_assertions/src/libstd/sys_common/backtrace.rs:130
 138:     0x7fba034c6fa2 - std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}::h9022af17d631ad6a
                               at /home/matthias/vcs/github/rust_debug_assertions/src/libstd/thread/mod.rs:475
 139:     0x7fba034c6fa2 - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h5e5dad8a458c6abd
                               at /home/matthias/vcs/github/rust_debug_assertions/src/libstd/panic.rs:318
 140:     0x7fba034c6fa2 - std::panicking::try::do_call::h616cf33da5710556
                               at /home/matthias/vcs/github/rust_debug_assertions/src/libstd/panicking.rs:297
 141:     0x7fba034c6fa2 - std::panicking::try::h7fb8aa72d302763a
                               at /home/matthias/vcs/github/rust_debug_assertions/src/libstd/panicking.rs:274
 142:     0x7fba034c6fa2 - std::panic::catch_unwind::h11f43d244e6f1c81
                               at /home/matthias/vcs/github/rust_debug_assertions/src/libstd/panic.rs:394
 143:     0x7fba03540f7e - std::thread::Builder::spawn_unchecked::{{closure}}::h99408cb131e40a87
                               at /home/matthias/vcs/github/rust_debug_assertions/src/libstd/thread/mod.rs:474
 144:     0x7fba03540f7e - core::ops::function::FnOnce::call_once{{vtable.shim}}::heac3ffa86c23e437
                               at /home/matthias/vcs/github/rust_debug_assertions/src/libcore/ops/function.rs:232
 145:     0x7fba006d34ba - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hce26af002d3e3784
                               at /home/matthias/vcs/github/rust_debug_assertions/src/liballoc/boxed.rs:1057
 146:     0x7fba006d34ba - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::ha21cf65534ccc991
                               at /home/matthias/vcs/github/rust_debug_assertions/src/liballoc/boxed.rs:1057
 147:     0x7fba006d34ba - std::sys::unix::thread::Thread::new::thread_start::hb55460550d344e2e
                               at src/libstd/sys/unix/thread.rs:87
 148:     0x7fba003e246f - start_thread
 149:     0x7fba004ff3d3 - clone
 150:                0x0 - <unknown>

error: internal compiler error: unexpected panic

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.45.0-dev running on x86_64-unknown-linux-gnu

note: compiler flags: -Z mir-opt-level=3 -Z save-analysis -Z dump-mir-dir=/dev/null

query stack during panic:
end of query stack
error: aborting due to 554 previous errors

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.

@matthiaskrgr matthiaskrgr 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 May 23, 2020
@JohnTitor JohnTitor added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label May 28, 2020
@Elinvynia Elinvynia added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Jun 1, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Jun 25, 2020
…n-width, r=estebank

emitter: column width defaults to 140

Fixes rust-lang#72509.

This PR modifies the column width computation in the emitter when `termize::dimensions` returns `None` so that it uses the default value of 140 (which is used in UI testing currently) instead of `usize::MAX` which just ends up causing overflows in later computations.

I also tried changing the computations which used `column_width` with their saturating equivalent, but the output appeared the same - so I decided to go with this approach because I feel like it's less likely to accidentally re-introduce an ICE like this in future (e.g. adding a non-saturating operation on `column_width` in future).

I haven't added a test because I couldn't come up with a MCVE. I stumbled upon this running rustc-perf with the `piston-image` benchmark (running in tmux; it only happened with stage two builds only; and only when running through Cargo, not rustc directly with the same flags). In addition, given the nature of the issue, I don't know that we *could* write a UI test for this. Open to suggestions here though.

r? @estebank
@bors bors closed this as completed in 97ccd97 Jun 26, 2020
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. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants