rt: Remove the lock around upcall_vec_append. Add a test case. Closes #156.

This commit is contained in:
Patrick Walton 2011-06-29 10:32:58 -07:00
parent 54f618128e
commit a2ce532337
2 changed files with 7 additions and 1 deletions

View file

@ -470,7 +470,6 @@ upcall_vec_append(rust_task *task, type_desc *t, type_desc *elem_t,
rust_vec **dst_ptr, rust_vec *src, bool skip_null)
{
LOG_UPCALL_ENTRY(task);
scoped_lock with(task->kernel->scheduler_lock);
rust_vec *dst = *dst_ptr;
uintptr_t need_copy;
size_t n_src_bytes = skip_null ? src->fill - 1 : src->fill;

View file

@ -0,0 +1,7 @@
// xfail-stage0
fn main() {
auto a = ~[ 1, 2, 3, 4, 5 ];
auto b = [ a, a ];
b += b;
}