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 in span_to_lines, 'capacity_overflow' #24761

Closed
swgillespie opened this issue Apr 24, 2015 · 1 comment
Closed

ICE in span_to_lines, 'capacity_overflow' #24761

swgillespie opened this issue Apr 24, 2015 · 1 comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@swgillespie
Copy link
Contributor

Building https://github.com/swgillespie/gccjit.rs/tree/rustc-ice causes this for me.

$ RUST_BACKTRACE=1 cargo build
   Compiling gccjit v0.0.1 (file:///home/sean/Documents/workspace/rust/gccjit-rs/examples/factorial)
/home/sean/Documents/workspace/rust/gccjit-rs/src/rvalue.rs:76:25: 66:79 error: mismatched types:
 expected `gccjit_sys::gcc_jit_binary_op`,
    found `i32`
(expected enum `gccjit_sys::gcc_jit_binary_op`,
    found i32) [E0308]
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', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/option.rs:330

stack backtrace:
   1:     0x7f81efa5af39 - sys::backtrace::write::h7638fca3b07af337rVs
   2:     0x7f81efa62bb6 - panicking::on_panic::h64a1f0366c6b8a23mkx
   3:     0x7f81efa1f912 - rt::unwind::begin_unwind_inner::hcaa5609c9e3078adwZw
   4:     0x7f81efa1fb97 - rt::unwind::begin_unwind_fmt::h1d03ac96c877ea14CYw
   5:     0x7f81efa62796 - rust_begin_unwind
   6:     0x7f81efab4404 - panicking::panic_fmt::hc7c67cbed9e89d8ddTC
   7:     0x7f81ecdb49af - codemap::CodeMap::span_to_lines::hf8f1a35dc982b5e4ahA
   8:     0x7f81ecdf97d7 - diagnostic::emit::h7379a6cfef339f7a7TB
   9:     0x7f81ecdf7624 - diagnostic::EmitterWriter.Emitter::emit::h7d3188d973919325PQB
  10:     0x7f81ecdf5b7b - diagnostic::SpanHandler::span_err_with_code::h4b3154250eb71080pnB
  11:     0x7f81ed89c995 - session::Session::span_err_with_code::h81e7cead23b6ffdb8sp
  12:     0x7f81eda941b9 - middle::infer::error_reporting::InferCtxt<'a, 'tcx>.ErrorReporting<'tcx>::report_type_error::h90db3e78d8bb7e886nq
  13:     0x7f81eda95a26 - middle::infer::error_reporting::InferCtxt<'a, 'tcx>.ErrorReporting<'tcx>::report_and_explain_type_error::h8ba32c89aedde88cUpq
  14:     0x7f81edaee6f3 - middle::infer::InferCtxt<'a, 'tcx>::report_mismatched_types::h2fd9974dc99bf601BRy
  15:     0x7f81ef1aaca6 - check::demand::coerce::h782cae65c398feeaf6f
  16:     0x7f81ef21c17a - check::check_expr_with_unifier::h8593953848767686611
  17:     0x7f81ef1f9518 - check::check_argument_types::hafac6b2d63ad7094Z5p
  18:     0x7f81ef1f6aab - check::callee::confirm_builtin_call::he646cc87182b37cagrm
  19:     0x7f81ef1f53b5 - check::callee::check_call::h4b66c292a82ccddaYhm
  20:     0x7f81ef23fd2b - check::check_expr_with_unifier::h3006517761441790576
  21:     0x7f81ef26568b - check::check_decl_local::hefbaa8208ecc67818bs
  22:     0x7f81ef2103a1 - check::check_block_with_expected::h24feb1297ec9164beis
  23:     0x7f81ef1f3116 - check::check_fn::h1f3e323a3375062bN4n
  24:     0x7f81ef20bd87 - check::check_bare_fn::h3d6f361f6b701b01mUn
  25:     0x7f81ef2148bc - check::check_method_body::h1fba553d1633acb4Rvo
  26:     0x7f81ef209d48 - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h65cdf079010f6a6apRn
  27:     0x7f81ef20a0cf - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h65cdf079010f6a6apRn
  28:     0x7f81ef2cd0da - check_crate::closure.38363
  29:     0x7f81ef2c8470 - check_crate::h6dcd7dd401f4f117pCC
  30:     0x7f81effc1ae8 - driver::phase_3_run_analysis_passes::h3806bf444cc15f20tGa
  31:     0x7f81effa2e70 - driver::compile_input::h4642f691e22278cbQba
  32:     0x7f81f0063331 - run_compiler::he528ba831532b90aF4b
  33:     0x7f81f0060f82 - boxed::F.FnBox<A>::call_box::h13568337174014462877
  34:     0x7f81f00604b9 - rt::unwind::try::try_fn::h15381261312250239500
  35:     0x7f81efada528 - rust_try_inner
  36:     0x7f81efada515 - rust_try
  37:     0x7f81f0060768 - boxed::F.FnBox<A>::call_box::h6713016946069099629
  38:     0x7f81efa61ac1 - sys::thread::create::thread_start::hbe89fbdfc755452dxjw
  39:     0x7f81e9b09f6d - start_thread
  40:     0x7f81ef6959cc - clone
  41:                0x0 - <unknown>
@sanxiyn sanxiyn added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 25, 2015
pnkfelix added a commit to pnkfelix/rust that referenced this issue Apr 30, 2015
There a number of recent issues that report the bug here.  See
e.g. rust-lang#24761 and rust-lang#24954.

This change does *not* fix them; it just makes the assert more
immediate (and also injects a more conservative check, in that we are
also checking that the files match up).

So, this does not directly fix any bugs, and is expected ot actually
inject new ICE's.  But those will all represent latent bugs that need
fixing.
pnkfelix added a commit to pnkfelix/rust that referenced this issue Apr 30, 2015
Make `span_to_lines` to return a `Result`.
(This is better than just asserting internally, since it allows caller
to decide if they can recover from the problem.)

Added type alias for `FileLinesResult` returned by `span_to_lines`.

Update embedded unit test to reflect `span_to_lines` signature change.

In diagnostic, catch `Err` from `span_to_lines` and print
`"(unprintable span)"` instead.

----

There a number of recent issues that report the bug here.  See
e.g. rust-lang#24761 and rust-lang#24954.

This change *might* fix them. However, that is not its main goal.
The main goals are:

 1. Make it possible for callers to recover from an error here, and

 2. Insert a more conservative check, in that we are
    also checking that the files match up.
pnkfelix added a commit to pnkfelix/rust that referenced this issue May 4, 2015
Make `span_to_lines` to return a `Result`.
(This is better than just asserting internally, since it allows caller
to decide if they can recover from the problem.)

Added type alias for `FileLinesResult` returned by `span_to_lines`.

Update embedded unit test to reflect `span_to_lines` signature change.

In diagnostic, catch `Err` from `span_to_lines` and print
`"(internal compiler error: unprintable span)"` instead.

----

There a number of recent issues that report the bug here.  See
e.g. rust-lang#24761 and rust-lang#24954.

This change *might* fix them. However, that is not its main goal.
The main goals are:

 1. Make it possible for callers to recover from an error here, and

 2. Insert a more conservative check, in that we are
    also checking that the files match up.
pnkfelix added a commit to pnkfelix/rust that referenced this issue May 5, 2015
Make `span_to_lines` to return a `Result`.
(This is better than just asserting internally, since it allows caller
to decide if they can recover from the problem.)

Added type alias for `FileLinesResult` returned by `span_to_lines`.

Update embedded unit test to reflect `span_to_lines` signature change.

In diagnostic, catch `Err` from `span_to_lines` and print
`"(internal compiler error: unprintable span)"` instead.

----

There a number of recent issues that report the bug here.  See
e.g. rust-lang#24761 and rust-lang#24954.

This change *might* fix them. However, that is not its main goal.
The main goals are:

 1. Make it possible for callers to recover from an error here, and

 2. Insert a more conservative check, in that we are
    also checking that the files match up.
bors added a commit that referenced this issue May 7, 2015
Guard against overflow in `codemap::span_to_lines`.

(Revised/expanded version of PR #24976)

Make `span_to_lines` to return a `Result`.

In `diagnostic`, catch `Err` from `span_to_lines` and print `"(unprintable span)"` instead.

----

There a number of recent issues that report the bug here.  See e.g. #24761 and #24954.

This change *might* fix them. However, that is *not* its main goal. The main goals are:

 1. Make it possible for callers to recover from an error here, and

 2. Insert a more conservative check, in that we are also checking that the files match up.

----

As a drive-by, fix #24997 , which was causing my attempts to `make check-stage1` on an `--enable-debug` build to fail.
bors added a commit that referenced this issue May 7, 2015
Guard against overflow in `codemap::span_to_lines`.

(Revised/expanded version of PR #24976)

Make `span_to_lines` to return a `Result`.

In `diagnostic`, catch `Err` from `span_to_lines` and print `"(unprintable span)"` instead.

----

There a number of recent issues that report the bug here.  See e.g. #24761 and #24954.

This change *might* fix them. However, that is *not* its main goal. The main goals are:

 1. Make it possible for callers to recover from an error here, and

 2. Insert a more conservative check, in that we are also checking that the files match up.

----

As a drive-by, fix #24997 , which was causing my attempts to `make check-stage1` on an `--enable-debug` build to fail.
@steveklabnik
Copy link
Member

Triage: the code here is so old that it doesn't compile anymore at all; it was before rust 1.0 As such, I'm giving it a close. @swgillespie if you're still seeing this with new code, please let me know!

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

3 participants