Closed marcomaggi closed 13 years ago
The following does not crash:
(define n 1057111)
(apply + (make-list n 1))
the following does crash:
(define n 1057112)
(apply + (make-list n 1))
it fails with a "large closure size" warning message from "ikarus-collect.c".
Fixed in devel branch by introducing an artificial limit to the arguments APPLY accepts in its final list:
Vicare Scheme version 0.2d1
Revision devel/be907ca0640d027d32ca638fc969fc886efc6ddb
Build 2011-11-01
Copyright (c) 2006-2010 Abdulaziz Ghuloum and contributors
Copyright (c) 2011 Marco Maggi
vicare> (apply + (make-list 5000 1))
Unhandled exception
Condition components:
1. &assertion
2. &who: apply
3. &message: "expected proper list as argument with maximum length 1024"
4. &irritants: ((1 1 1 1 1 ...))
vicare>
the limit is hard-coded in the file "ikarus.apply.ss" as:
(define CALL-ARGUMENTS-LIMIT 1024)
as comparison, from its own documentation: LispWorks for Unix sets this value to 300, LispWorks for Windows and LispWorks for Linux set this value to 255.
Matches bug 163689 at the Ikarus bug tracker.