There seems to be a bug around the compilation of illegal LET/LET* init forms with an extra set of parentheses.
The form
(defun f () (let ((x ((1))))) 42)
when placed in a file, and compiled gives a error on loading the file that it can't find the '.cls' associated with this function. Looking at the FASL shows that the '.cls' is zero length.
The compiler should signal an error when compiling the form rather than writing the malformed FASL. Presumably this is a failure to recognize that the compilation of the the LET init form has failed somewhere in the compiler.
I suggest considering that we re-enable the VERIFY-LOAD when maximum compiler safety is requested. Erik disabled this in svn r12015 to increase compilation speed.
--- a/src/org/armedbear/lisp/compile-file.lisp Sat Oct 31 11:51:27 2009 +0100 +++ b/src/org/armedbear/lisp/compile-file.lisp Fri Nov 06 13:42:26 2009 +0100 @@ -68,14 +68,13 @@ (assert nil))
(declaim (ftype (function (t) t) verify-load)) -;(defun verify-load (classfile) -; (and classfile -; (let ((*load-truename* *output-file-pathname*)) -; (report-error -; (load-compiled-function classfile))))) (defun verify-load (classfile) - (declare (ignore classfile)) - t) + (if (= *safety* 3) + (and classfile + (let ((*load-truename* *output-file-pathname*)) + (report-error + (load-compiled-function classfile)))) + t))
2009/11/6 Mark Evenson evenson@panix.com:
I suggest considering that we re-enable the VERIFY-LOAD when maximum compiler safety is requested. Erik disabled this in svn r12015 to increase compilation speed.
Compiler safety when using or building abcl?
The bug in question seems to be something very wrong in the precompiler...
On 11/6/09 2:05 PM, Ville Voutilainen wrote: […]
Compiler safety when using or building abcl?
The patch in my previous email in this thread restored checking the loading of compiled FASLs when using ABCL.
armedbear-devel@common-lisp.net