Skip to content

Commit 866ee6e

Browse files
Eric Holkgraydon
authored andcommitted
Re-enabling some tests.
1 parent f6f8a06 commit 866ee6e

File tree

6 files changed

+6
-15
lines changed

6 files changed

+6
-15
lines changed

src/comp/back/upcall.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn declare_upcalls(type_names tn, ModuleRef llmod) -> @upcalls {
100100
mark=d("mark", [T_ptr(T_i8())], T_int()),
101101
new_str=d("new_str", [T_ptr(T_i8()), T_size_t()],
102102
T_ptr(T_str())),
103-
dup_str=d("dup_str", [T_ptr(T_str())],
103+
dup_str=d("dup_str", [T_taskptr(tn), T_ptr(T_str())],
104104
T_ptr(T_str())),
105105
new_vec=d("new_vec", [T_size_t(), T_ptr(T_tydesc(tn))],
106106
T_opaque_vec_ptr()),

src/comp/middle/trans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6512,7 +6512,7 @@ fn deep_copy(&@block_ctxt bcx, ValueRef v, ty::t t, ValueRef target_task)
65126512
else if(ty::type_is_str(tcx, t)) {
65136513
ret rslt(bcx,
65146514
bcx.build.Call(bcx.fcx.lcx.ccx.upcalls.dup_str,
6515-
[bcx.fcx.lltaskptr, v]));
6515+
[bcx.fcx.lltaskptr, target_task, v]));
65166516
}
65176517
else if(ty::type_is_chan(tcx, t)) {
65186518
// If this is a channel, we need to clone it.

src/rt/rust_upcall.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,11 @@ upcall_new_str(rust_task *task, char const *s, size_t fill) {
355355
}
356356

357357
extern "C" CDECL rust_str *
358-
upcall_dup_str(rust_task *task, rust_str *str) {
358+
upcall_dup_str(rust_task *task, rust_task *target, rust_str *str) {
359359
LOG_UPCALL_ENTRY(task);
360360
scoped_lock with(task->kernel->scheduler_lock);
361361

362-
return make_str(task, (char const *)str->data, str->fill);
362+
return make_str(target, (char const *)str->data, str->fill);
363363
}
364364

365365
extern "C" CDECL rust_vec *
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
2-
3-
41
// xfail-stage0
5-
// xfail-stage1
6-
// xfail-stage2
72
// Reported as issue #126, child leaks the string.
83
fn child2(str s) { }
94

10-
fn main() { auto x = spawn child2("hi"); }
5+
fn main() { auto x = spawn child2("hi"); }

src/test/run-pass/spawn-types.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66

77
// xfail-stage0
8-
// xfail-stage1
9-
// xfail-stage2
108

119
use std;
1210

src/test/run-pass/task-life-0.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// xfail-stage0
2-
// xfail-stage1
3-
// xfail-stage2
42
fn main() -> () {
53
spawn child("Hello");
64
}
75

86
fn child(str s) {
97

10-
}
8+
}

0 commit comments

Comments
 (0)