Permalink
Browse files

workaround CCL optimization bug for digests

Anything higher than (SPEED 0) causes mysterious test failures; this
declaration doesn't seem to affect the speed much in any event.  Tested
with CCL Linux/x86-64; it's possible the bug appears in older versions
as well.
  • Loading branch information...
froydnj committed Jun 25, 2012
1 parent aba617d commit 98ebf00badbad7bbd4859b543de5d67939d1652c
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/digests/digest.lisp
View
@@ -153,7 +153,12 @@
,@(when (stringp maybe-doc-string)
`(,maybe-doc-string))
(flet ((,inner-fun-name (state %buffer buffer-start)
- ,(hold-me-back)
+ ;; CCL requires special treatment to not introduce
+ ;; array indexing errors.
+ ,(cond
+ ((member :ccl *features*)
+ '(declare (optimize (speed 0))))
+ (t (hold-me-back)))
(macrolet ((finalize-registers (state regs)
(let ((clauses
(loop for (digest-name digest-length) in ',specs

0 comments on commit 98ebf00

Please sign in to comment.