Crash when appending to _vec.alloc'ed vector

f570b26
Opened by Jeffrey Yasskin at 2010-07-23 00:47:38

The following code crashes inside of glue$copy$s, I believe when trying to decrement a refcount. The crash goes away if I don't use std._vec.alloc, if I change 'str' to 'int', or if the 'str' isn't a type parameter.

use std;

fn slice[T](vec[T] e) {
  let vec[T] result = std._vec.alloc[T](uint(1));
  result += e;
}

fn main() {
  slice[str](vec("a"));
}
  1. Notify copy glue of dst-initialization and fix _vec.alloc issues in lib and runtime. Closed by 1730d2e037fc41f31d0a90b2fde477f02f0fc798.

    Roy Frostig at 2010-07-23 00:47:38