Skip to content

thread 'rustc' panicked at 'capacity overflow #24841

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
Zoxc opened this issue Apr 26, 2015 · 2 comments
Closed

thread 'rustc' panicked at 'capacity overflow #24841

Zoxc opened this issue Apr 26, 2015 · 2 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@Zoxc
Copy link
Contributor

Zoxc commented Apr 26, 2015

When compiling https://github.com/Zoxc/RustParser/tree/4f9284bb576bd4b68054bfe1b96c146b0bfd7e48

On rustc 1.1.0-nightly (90cc830 2015-04-22) (built 2015-04-23) and rustc 1.1.0-nightly (da62384 2015-04-25) (built 2015-04-26).

cargo run
   Compiling parser v0.1.0 (file:///B:/Programmering/Lang2/RustParser/parser)
src\parser.rs:321:22: 41:25 error: attempted access of field `span` on type `ast::N<ast::Ty>`, but no field with that name was found
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: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'capacity overflow', C:/bot/slave/nightly-dist-rustc-win-64/build/src/libcore\option.rs:330

stack backtrace:
   1:         0x711b6f28 - sys::backtrace::write::hadc3c0fd0973fcf0L9r
   2:         0x711c0411 - rt::unwind::register::h552a25b201babb70zuv
   3:         0x71185200 - rt::unwind::begin_unwind_inner::h898d33e1214d96a4Jrv
   4:         0x71185c17 - rt::unwind::begin_unwind_fmt::h9942b1985ee508bdPqv
   5:         0x711c007a - rust_begin_unwind
   6:         0x711d8209 - panicking::panic_fmt::h4fda9fba900efc41yKy
   7:           0x4b5513 - codemap::CodeMap::span_to_lines::h212fb71d60628d42eiA
   8:           0x4f6ee1 - diagnostic::Destination.Write::flush::h9424a80c681a6f858SB
   9:           0x4f4e06 - diagnostic::EmitterWriter.Emitter::emit::h6838c6eec921e61dvTB
  10:           0x4ac60b - diagnostic::SpanHandler::span_err::h4505bd980d1d01821oB
  11:           0xc5a2df - session::Session::span_err::h139fb33f1377ba3dMhp
  12:          0x145dc0d - check::UnresolvedTypeAction...std..clone..Clone::clone::hd8a8eda72fed9cc3yKp
  13:          0x1466226 - check::UnresolvedTypeAction...std..clone..Clone::clone::hd8a8eda72fed9cc3yKp
  14:          0x1489f4a - check::Expectation<'tcx>.Repr<'tcx>::repr::h12696914f8ca39f6A8r
  15:          0x1439e9e - check::GatherLocalsVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h2217a1ca6922a5cdv4n
  16:          0x1465e25 - check::UnresolvedTypeAction...std..clone..Clone::clone::hd8a8eda72fed9cc3yKp
  17:          0x147cde1 - check::UnresolvedTypeAction...std..clone..Clone::clone::hd8a8eda72fed9cc3yKp
  18:          0x1439ee1 - check::GatherLocalsVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h2217a1ca6922a5cdv4n
  19:          0x144fb5e - check::UnresolvedTypeAction...std..clone..Clone::clone::hd8a8eda72fed9cc3yKp
  20:          0x145fdc1 - check::UnresolvedTypeAction...std..clone..Clone::clone::hd8a8eda72fed9cc3yKp
  21:          0x1439e74 - check::GatherLocalsVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h2217a1ca6922a5cdv4n
  22:          0x141d68a - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h69e389465fa8a188cTo
  23:          0x14358cf - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h21b049729c04fab3pRn
  24:          0x143e58a - check::GatherLocalsVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h2217a1ca6922a5cdv4n
  25:          0x14339ab - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h21b049729c04fab3pRn
  26:          0x1433d1f - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h21b049729c04fab3pRn
  27:          0x14ef24b - check_crate::h82dccdfc3a50d8fapCC
  28:          0x14ea399 - check_crate::h82dccdfc3a50d8fapCC
  29:         0x652e20d9 - driver::phase_3_run_analysis_passes::h16f3d4c5d33f7f9etGa
  30:         0x652c2b5b - driver::compile_input::hc3f8157a9f13e39fQba
  31:         0x6537c063 - run_compiler::h5b60c520e23e6ab6F4b
  32:         0x65379bef - run::h0e08021a376a8e05l4b
  33:         0x6537917a - run::h0e08021a376a8e05l4b
  34:         0x711f52cc - rust_try
  35:         0x711f52a9 - rust_try
  36:         0x65379411 - run::h0e08021a376a8e05l4b
  37:         0x711be604 - sys::process2::Command::cwd::h1fb48720c2b98815w9t
  38:     0x7ffa258e13d2 - BaseThreadInitThunk

Could not compile `parser`.

To learn more, run the command again with --verbose.```
@strega-nil
Copy link
Contributor

I get this issue compiling libcore when there are a lot of errors, as well.

@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 28, 2015
@bltavares
Copy link
Contributor

Triaging: I've checked out the repository on that exact commit and it does not ICE anymore.

rustc 1.8.0-nightly (15e9a95a4 2016-02-26)
cargo 0.9.0-nightly (ff4bda2 2016-02-25)

Now it causes an error because of incompatible types on an arm during macro expansions.

   Compiling parser v0.1.0 (file:///private/tmp/RustParser)
src/parser.rs:41:15: 41:25 error: attempted access of field `span` on type `ast::N<ast::Ty>`, but no field with that name was found
src/parser.rs:41        let start = $node.span;
                                    ^~~~~~~~~~
src/parser.rs:321:8: 324:6 note: in this expansion of extend! (defined in src/parser.rs)
src/parser.rs:41:21: 41:25 help: did you mean `val`?
src/parser.rs:41        let start = $node.span;
                                          ^~~~
src/parser.rs:321:8: 324:6 note: in this expansion of extend! (defined in src/parser.rs)
src/parser.rs:364:4: 380:5 error: match arms have incompatible types:
 expected `ast::Expr`,
    found `ast::N<ast::Expr>`
(expected enum `ast::Expr`,
    found struct `ast::N`) [E0308]
src/parser.rs:364           match self.tok() {
src/parser.rs:365               Token::Name(KW_LOOP) => {
src/parser.rs:366                   let baseline = self.lexer.indent;
src/parser.rs:367                   self.step();
src/parser.rs:368                   Expr::Loop(self.block(baseline, Parser::try_expr))
src/parser.rs:369               }
                  ...
src/parser.rs:363:3: 381:5 note: in this expansion of noded! (defined in src/parser.rs)
src/parser.rs:364:4: 380:5 help: run `rustc --explain E0308` to see a detailed explanation
src/parser.rs:379:11: 379:33 note: match arm with an incompatible type
src/parser.rs:379               _ =>  self.assign_operator()
                                      ^~~~~~~~~~~~~~~~~~~~~~
src/parser.rs:363:3: 381:5 note: in this expansion of noded! (defined in src/parser.rs)
src/parser.rs:385:16: 385:29 error: no method named `pred_operator` found for type `&mut parser::Parser<'c>` in the current scope
src/parser.rs:385       let r = self.pred_operator(self.unary());
                                     ^~~~~~~~~~~~~
src/parser.rs:385:35: 385:40 error: no method named `unary` found for type `&mut parser::Parser<'c>` in the current scope
src/parser.rs:385       let r = self.pred_operator(self.unary());
                                                        ^~~~~
src/parser.rs:41:15: 41:25 error: the type of this value must be known in this context
src/parser.rs:41        let start = $node.span;
                                    ^~~~~~~~~~
src/parser.rs:389:5: 392:7 note: in this expansion of extend! (defined in src/parser.rs)
src/parser.rs:391:6: 391:18 error: no associated item named `Assign` found for type `ast::Expr` in the current scope
src/parser.rs:391                   Expr::Assign(OP_ASSIGN, r, self.expr())
                                    ^~~~~~~~~~~~
src/parser.rs:389:5: 392:7 note: in this expansion of extend! (defined in src/parser.rs)
src/parser.rs:399:14: 399:24 error: no method named `is_prec_op` found for type `&mut parser::Parser<'c>` in the current scope
src/parser.rs:399       while self.is_prec_op() {
                                   ^~~~~~~~~~
src/parser.rs:402:15: 402:23 error: attempted access of field `src` on type `&mut parser::Parser<'c>`, but no field with that name was found
src/parser.rs:402           let prec = self.src.ctx.op_map.get(op);
                                       ^~~~~~~~
src/parser.rs:407:25: 407:30 error: no method named `unary` found for type `&mut parser::Parser<'c>` in the current scope
src/parser.rs:407           let mut right = self.unary();
                                                 ^~~~~
src/parser.rs:409:15: 409:25 error: no method named `is_prec_op` found for type `&mut parser::Parser<'c>` in the current scope
src/parser.rs:409           while self.is_prec_op() {
                                       ^~~~~~~~~~
src/parser.rs:411:21: 411:29 error: attempted access of field `src` on type `&mut parser::Parser<'c>`, but no field with that name was found
src/parser.rs:411               let next_prec = self.src.ctx.op_map.get(next_op);
                                                ^~~~~~~~
src/parser.rs:41:15: 41:25 error: attempted access of field `span` on type `ast::N<ast::Expr>`, but no field with that name was found
src/parser.rs:41        let start = $node.span;
                                    ^~~~~~~~~~
src/parser.rs:420:11: 420:60 note: in this expansion of extend! (defined in src/parser.rs)
src/parser.rs:41:21: 41:25 help: did you mean `val`?
src/parser.rs:41        let start = $node.span;
                                          ^~~~
src/parser.rs:420:11: 420:60 note: in this expansion of extend! (defined in src/parser.rs)
src/parser.rs:420:31: 420:42 error: no associated item named `BinOp` found for type `ast::Expr` in the current scope
src/parser.rs:420           left = extend!(self, left, Expr::BinOp(left, op, right))
                                                       ^~~~~~~~~~~
src/parser.rs:420:11: 420:60 note: in this expansion of extend! (defined in src/parser.rs)
error: aborting due to 13 previous errors
Could not compile `parser`.

To learn more, run the command again with --verbose.

@Zoxc Zoxc closed this as completed Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants