~ chicken-core (chicken-5) ad0be3617b0b558be3a5e852a503fbfa5a2bcc1e


commit ad0be3617b0b558be3a5e852a503fbfa5a2bcc1e
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Jul 14 11:03:58 2015 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Tue Jul 14 11:03:58 2015 +0200

    repaired rest-list allocation

diff --git a/c-backend.scm b/c-backend.scm
index 1ae96994..2dc3cddf 100644
--- a/c-backend.scm
+++ b/c-backend.scm
@@ -837,8 +837,8 @@
 		       (or rest external (> demand 0)) )
 		  (cond [rest
 			 (gen #t "C_save_and_reclaim((void*)" id ",c,av);}"
-			      #t "a=C_alloc((c-" n ")*3+" demand ");")
-			 (gen #t "t" n "=C_build_rest(a," n ",av);")
+			      #t "a=C_alloc((c-" n ")*C_SIZEOF_PAIR+" demand ");")
+			 (gen #t "t" n "=C_build_rest(&a,c," n ",av);")
 			 (do ([i (+ n 1) (+ i 1)]
 			      [j temps (- j 1)] )
 			     ((zero? j))
Trap