Skip to content

Commit a2ce532

Browse files
committed
rt: Remove the lock around upcall_vec_append. Add a test case. Closes #156.
1 parent 54f6181 commit a2ce532

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/rt/rust_upcall.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ upcall_vec_append(rust_task *task, type_desc *t, type_desc *elem_t,
470470
rust_vec **dst_ptr, rust_vec *src, bool skip_null)
471471
{
472472
LOG_UPCALL_ENTRY(task);
473-
scoped_lock with(task->kernel->scheduler_lock);
474473
rust_vec *dst = *dst_ptr;
475474
uintptr_t need_copy;
476475
size_t n_src_bytes = skip_null ? src->fill - 1 : src->fill;
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// xfail-stage0
2+
3+
fn main() {
4+
auto a = ~[ 1, 2, 3, 4, 5 ];
5+
auto b = [ a, a ];
6+
b += b;
7+
}

0 commit comments

Comments
 (0)