shithub: mc

Download patch

ref: 7439e43b38569064395880551b1541db79bcfed5
parent: 01d9c59aa0f27db7bd3b9b8c1978c9a65c5e60a0
author: Ori Bernstein <[email protected]>
date: Fri Jul 20 17:56:08 EDT 2018

Fix codegen bug in env capture.

	We could capture too little in the env, because we didn't
	account for padding in the captures.

--- a/6/simp.c
+++ b/6/simp.c
@@ -994,6 +994,7 @@
 		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);