Skip to content

Commit 21efd07

Browse files
author
Eric Holk
committed
New tasks run, but their arguments get lost and something ends up in an infinite loop when the task exits.
1 parent e3b3a71 commit 21efd07

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/comp/middle/trans.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5932,8 +5932,12 @@ fn trans_spawn(&@block_ctxt cx,
59325932
auto llfnptr = bcx.build.GEP(fnptr.val,
59335933
[C_int(0), C_int(0)]);
59345934
log_err "Casting llfnptr";
5935-
auto llfnptr_i = bcx.build.PointerCast(llfnptr,
5936-
T_int());
5935+
auto llfnptrptr_i = bcx.build.PointerCast(llfnptr,
5936+
T_ptr(T_int()));
5937+
// We'd better dereference this one more time, since that one points into
5938+
// the symbol table or something.
5939+
auto llfnptr_i = bcx.build.Load(llfnptrptr_i);
5940+
59375941
log_err "Cassting llargs";
59385942
auto llargs_i = bcx.build.PointerCast(llargs.val,
59395943
T_int());

0 commit comments

Comments
 (0)