From: vrotaru <rotaru@ce...>  20050911 00:52:32

Hi, all A few hours early, with some rather convoluted code (doing a problem from SPOJ), I have run into this: propmpt> sbcl [..] * (compilefile "sbclbug") ; compiling file "/home/rv/lisp/homework/sbclbuf/sbclbug.lisp" (written 11 SEP 2005 02:04:38 AM): ; compiling (LET* (# # ...) ...) debugger invoked on a SBINT:BUG in thread #<THREAD "initial thread" {9003439}>: failed AVER: "(EQ PHYSENV (LAMBDAPHYSENV (LAMBDAVARHOME THING)))" This is probably a bug in SBCL itself. (Alternatively, SBCL might have been corrupted by bad user code, e.g. by an undefined Lisp operation like (FMAKUNBOUND 'COMPILE), or by stray pointers from alien code or from unsafe Lisp code; or there might be a bug in the OS or hardware that SBCL is running on.) If it seems to be a bug in SBCL itself, the maintainers would like to know about it. Bug reports are welcome on the SBCL mailing lists, which you can find at <http://sbcl.sourceforge.net/>;. Offending file follows ;;;; * Mode: Lisp; Syntax: ANSICOMMONLISP; * (let* ((initialsize (expt 2 16)) (primetable (makearray initialsize :elementtype 'integer)) (firstprimes #(5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281)) (count 0) (increment 2)) (defun largestprimesofar () (aref primetable (1 count))) (defun addprime (prime) (setf (aref primetable count) prime) (incf count)) (defun inittable () (map 'nil #'addprime firstprimes)) (defun nextcandidate (candidate) (prog1 (+ candidate increment) (ecase increment (2 (setf increment 4)) (4 (setf increment 2))))) (defun primep (n) (let ((sqrtn (truncate (sqrt n)))) (dotimes (i count) (let ((prime (aref primetable i))) (when (> prime sqrtn) (returnfrom primep t)) (when (zerop (mod n prime)) (returnfrom primep nil)))) (error "~&primetable too small: ~A ~A~%" n (largestprimesofar)))) (defun generateprimes (required) (do ((candidate (nextcandidate (largestprimesofar)) (nextcandidate candidate))) ((> candidate required)) (when (primep candidate) (addprime candidate)))) ;; (inittable)) An interesting data point is that from Emacs (via Cc Cc) this form compiles O.K.  If in doubt, enjoy it. 