aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-13 13:37:24 -0700
committerGraydon Hoare <[email protected]>2010-09-13 13:37:24 -0700
commitbc646d01c501f2566fd78057e23c283cfedc0eb0 (patch)
tree9bfe2f19a42e79b1ded82be5428f0bb33ec3f61f /src/boot/me
parentFix a leak when box types are used via type descriptors. (diff)
downloadrust-bc646d01c501f2566fd78057e23c283cfedc0eb0.tar.xz
rust-bc646d01c501f2566fd78057e23c283cfedc0eb0.zip
Fix leaking arg slots on tail calls. Closes #160.
Diffstat (limited to 'src/boot/me')
-rw-r--r--src/boot/me/trans.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml
index ad0d6445..dd1dd46d 100644
--- a/src/boot/me/trans.ml
+++ b/src/boot/me/trans.ml
@@ -4219,6 +4219,8 @@ let trans_visitor
(Printf.sprintf "copy args for tail call to %s" (logname ())));
copy_fn_args true true CLONE_none call;
drop_slots_at_curr_stmt();
+ iflog (fun _ -> annotate "drop args");
+ iter_arg_slots cx (current_fn()) callee_drop_slot;
abi.Abi.abi_emit_fn_tail_call (emitter())
(force_sz (current_fn_callsz()))
caller_argsz callee_code callee_argsz;