Skip to content

ICE when using write!() without a mutable ref #19153

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
seanmonstar opened this issue Nov 20, 2014 · 2 comments
Closed

ICE when using write!() without a mutable ref #19153

seanmonstar opened this issue Nov 20, 2014 · 2 comments

Comments

@seanmonstar
Copy link
Contributor

If you do write!(w, ..) instead of write!(&mut w, ..).

task 'rustc' panicked at 'index out of bounds: the len is 6 but the index is 6', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/lib.rs:1

stack backtrace:
   1:     0x7fabba9c69c0 - rt::backtrace::imp::write::h7fe8534f465d0e09y9s
   2:     0x7fabba9c9b60 - failure::on_fail::h3fe2ecde6aab0bb8rwt
   3:     0x7fabbb18fc80 - unwind::begin_unwind_inner::he6bc2073d4eb582enbd
   4:     0x7fabbb18f900 - unwind::begin_unwind_fmt::h305b4b28825355b2y8c
   5:     0x7fabbb18f8c0 - rust_begin_unwind
   6:     0x7fabbb1d5a70 - panicking::panic_fmt::h9d03fcf6b4c3f8e10Nl
   7:     0x7fabbb1dae60 - panicking::panic_bounds_check::h5c6357fea6530f04yMl
   8:     0x7fabb883a130 - codemap::FileMap::get_line::h8bd7cfe56e6cfd5e1aF
   9:     0x7fabb88689b0 - diagnostic::emit::h2322127ddc0c36debCG
  10:     0x7fabb88653d0 - diagnostic::EmitterWriter.Emitter::emit::hb9a4d5c26c04e1df0xG
  11:     0x7fabb8863c50 - diagnostic::Handler::emit::ha390aea82acc4940kfG
  12:     0x7fabb8836910 - diagnostic::SpanHandler::span_err::h83b27707d23c7bfej3F
  13:     0x7fabb9c34720 - middle::typeck::infer::InferCtxt<'a, 'tcx>::type_error_message_str_with_expected::h72941615d6be270289E
  14:     0x7fabb9b40840 - middle::typeck::infer::InferCtxt<'a, 'tcx>::type_error_message::h3e78576a7aeba36csfF
  15:     0x7fabb9b49f70 - middle::typeck::check::check_expr_with_unifier::h23742768f253d831DLl
  16:     0x7fabb9b49f70 - middle::typeck::check::check_expr_with_unifier::h23742768f253d831DLl
  17:     0x7fabb9bbec40 - middle::typeck::check::check_decl_local::h24893462a5fe4409xSn
  18:     0x7fabb9bbee00 - middle::typeck::check::check_stmt::h1ca15bfe8a7d5a87xUn
  19:     0x7fabb9af8d90 - middle::typeck::check::check_block_with_expected::heebc1a2b04a42760MYn
  20:     0x7fabb9b49f70 - middle::typeck::check::check_expr_with_unifier::h23742768f253d831DLl
  21:     0x7fabb9a75100 - middle::typeck::check::_match::check_match::h2c871678897b201eeA8
  22:     0x7fabb9b49f70 - middle::typeck::check::check_expr_with_unifier::h23742768f253d831DLl
  23:     0x7fabb9af8d90 - middle::typeck::check::check_block_with_expected::heebc1a2b04a42760MYn
  24:     0x7fabb9b49f70 - middle::typeck::check::check_expr_with_unifier::h23742768f253d831DLl
  25:     0x7fabb9bbee00 - middle::typeck::check::check_stmt::h1ca15bfe8a7d5a87xUn
  26:     0x7fabb9af8d90 - middle::typeck::check::check_block_with_expected::heebc1a2b04a42760MYn
  27:     0x7fabb9af4810 - middle::typeck::check::check_fn::hd39b1b6b62f22c3fici
  28:     0x7fabb9af4530 - middle::typeck::check::check_bare_fn::h779ff7b2db70ca5bn1h
  29:     0x7fabb9afbda0 - middle::typeck::check::check_method_body::h6418d5a11969c3d7nwi
  30:     0x7fabb9af0310 - middle::typeck::check::check_item::hde22067b8b575546vli
  31:     0x7fabb9af3e60 - visit::walk_mod::h974639367282189498
  32:     0x7fabb9af3e60 - visit::walk_mod::h974639367282189498
  33:     0x7fabb9af41c0 - middle::typeck::check::check_item_types::h7118271db2ab8ea8x0h
  34:     0x7fabb9ee0e10 - util::common::time::h4997555828079517418
  35:     0x7fabb9ee0020 - middle::typeck::check_crate::h0949dffd97487b5ejVL
  36:     0x7fabbb693a10 - driver::driver::phase_3_run_analysis_passes::h7f3610cf195b4c3abfS
  37:     0x7fabbb688830 - driver::driver::compile_input::h13734d451479d6e7VVR
  38:     0x7fabbb70d7b0 - driver::run_compiler::h0a1cb9376c105f68pUT
  39:     0x7fabbb70d6a0 - driver::run::closure.59745
  40:     0x7fabbb519ee0 - task::TaskBuilder<S>::try_future::closure.39051
  41:     0x7fabbb519cd0 - task::TaskBuilder<S>::spawn_internal::closure.39022
  42:     0x7fabbba2db90 - task::NativeSpawner.Spawner::spawn::closure.2472
  43:     0x7fabbb1e84c0 - rust_try_inner
  44:     0x7fabbb1e84b0 - rust_try
  45:     0x7fabbb18d5e0 - unwind::try::h7c27f4e149aed3f2IZc
  46:     0x7fabbb18d470 - task::Task::run::h75863ac7ddab20c0y5b
  47:     0x7fabbba2d8d0 - task::NativeSpawner.Spawner::spawn::closure.2398
  48:     0x7fabbb18ec90 - thread::thread_start::h7822af80b22f729bEqc
  49:     0x7fabb5a4e0c0 - start_thread
  50:     0x7fabbae54f89 - __clone
  51:                0x0 - <unknown>

@japaric
Copy link
Member

japaric commented Nov 20, 2014

I reported this earlier in #19142, and it got closed as a duplicate of #14091.

cc @jakub-

@seanmonstar
Copy link
Contributor Author

woops. i thought it was introduced because of the fmt changes, and I didn't notice an issue recently filed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants