summaryrefslogtreecommitdiff
path: root/6
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-07-20 21:56:08 -0700
committerOri Bernstein <ori@eigenstate.org>2018-07-20 21:56:08 -0700
commit7439e43b38569064395880551b1541db79bcfed5 (patch)
treec538aed750776f8a897265139c97a3962c43b91e /6
parent01d9c59aa0f27db7bd3b9b8c1978c9a65c5e60a0 (diff)
downloadmc-7439e43b38569064395880551b1541db79bcfed5.tar.gz
Fix codegen bug in env capture.
We could capture too little in the env, because we didn't account for padding in the captures.
Diffstat (limited to '6')
-rw-r--r--6/simp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/6/simp.c b/6/simp.c
index 7ab6f15..812218c 100644
--- a/6/simp.c
+++ b/6/simp.c
@@ -994,6 +994,7 @@ capture(Simp *s, Node *n, Node *dst)
for (i = 0; i < nenv; i++) {
lappend(&envt, &nenvt, decltype(env[i]));
sz += size(env[i]);
+ sz = alignto(sz, decltype(env[i]));
}
t = gentemp(n->loc, mktytuple(n->loc, envt, nenvt), &dcl);