- Type check for INTEGER is inserted, the result of which serves as
- the first argument of M-V-C, is inserted after evaluation of NIL. So
- arguments of M-V-C are pushed in the wrong order. As a temporary
- workaround type checking was disabled for M-V-Cs in 0.7.9.13. A
- better solution would be to put a check between evaluation of
- arguments, but it could be tricky to check result types of PROG1, IF
- etc.
-
-222: "environment problems in PCL"
- Evaluating
-
- (symbol-macrolet ((x 1))
- (defmethod foo (z)
- (macrolet ((ml (form) `(progn ,form ,x)))
- (ml (print x)))))
-
- causes
-
- debugger invoked on condition of type UNBOUND-VARIABLE:
- The variable X is unbound.
-
-223: "(SETF FDEFINITION) and #' semantics broken for wrappers"
- Although this
- (defun foo (x)
- (print x))
- (defun traced (fn)
- (lambda (&rest rest)
- (format t "~&about to call ~S on ~S~%" fn rest)
- (apply fn rest)
- (format t "~&returned from ~S~%" fn)))
- (setf (fdefinition 'foo)
- (traced #'foo))
- (foo 11)
- does what one would expect, this
- (defun bar (x)
- (print x))
- (let ((bar0 #'bar))
- (setf (fdefinition 'bar)
- (lambda (&rest rest)
- (format t "~&about to enter BAR ~S~%" rest)
- (apply bar0 rest)
- (format t "~&back from BAR~%"))))
- (bar 12)
- recurses endlessly in sbcl-0.7.9.32. (Or it works if #' and
- FDEFINITION are replaced by SYMBOL-FUNCTION.)
-
-224:
- SBCL 0.7.8 fails to compile
-
- (localy (declare (optimize (safety 3)))
- (ignore-errors (progn (values-list (car (list '(1 . 2)))) t)))
-
- 226: "AVER failure in COMPILE-FILE of clocc-ansi-test/tests.lisp"
- (APD points out that this seems to be another symptom of bug #115.)
- sbcl-0.7.9.43 dies with failed AVER "(EQ (TN-PHYSENV TN) TN-ENV)" when
- trying to compile clocc-ansi-test/tests.lisp. sbcl-0.7.9.31 was able to
- to compile it. A smaller test case exhibiting the same problem is
- (declaim (optimize (speed 0) (safety 3) (debug 3)))
- (defun c-a-p ()
- (flet ((safe-format (stream string &rest r)
- (unless (ignore-errors (progn
- (apply #'format stream string r)
- t))
- (format stream "~&foo ~S" string))))
- (cond
- ((eq my-result :ERROR)
- (cond
- ((ignore-errors (typep condition result))
- (safe-format t "~&bar ~S" result))
- (t
- (safe-format t "~&baz ~S (~A) ~S" condition condition result)))))))
-
-227: "compiler bewilderment with adjustable vectors and COPY-SEQ"
- (fixed in sbcl-0.7.9.65)
+ Type check for INTEGER, the result of which serves as the first
+ argument of M-V-C, is inserted after evaluation of NIL. So arguments
+ of M-V-C are pushed in the wrong order. As a temporary workaround
+ type checking was disabled for M-V-Cs in 0.7.9.13. A better solution
+ would be to put the check between evaluation of arguments, but it
+ could be tricky to check result types of PROG1, IF etc.
+
+229:
+ (subtypep 'function '(function)) => nil, t.
+
+233: bugs in constraint propagation
+ a.
+ (defun foo (x)
+ (declare (optimize (speed 2) (safety 3)))
+ (let ((y 0d0))
+ (values
+ (the double-float x)
+ (setq y (+ x 1d0))
+ (setq x 3d0)
+ (quux y (+ y 2d0) (* y 3d0)))))
+ (foo 4) => segmentation violation
+
+ (see usage of CONTINUATION-ASSERTED-TYPE in USE-RESULT-CONSTRAINTS)
+ (see also bug 236)
+
+ b.
+ (declaim (optimize (speed 2) (safety 3)))
+ (defun foo (x y)
+ (if (typep (prog1 x (setq x y)) 'double-float)
+ (+ x 1d0)
+ (+ x 2)))
+ (foo 1d0 5) => segmentation violation
+
+235: "type system and inline expansion"
+ a.
+ (declaim (ftype (function (cons) number) acc))
+ (declaim (inline acc))
+ (defun acc (c)
+ (the number (car c)))
+
+ (defun foo (x y)
+ (values (locally (declare (optimize (safety 0)))
+ (acc x))
+ (locally (declare (optimize (safety 3)))
+ (acc y))))
+
+ (foo '(nil) '(t)) => NIL, T.
+
+ b. (reported by brown on #lisp 2003-01-21)
+
+ (defun find-it (x)
+ (declare (optimize (speed 3) (safety 0)))
+ (declare (notinline mapcar))
+ (let ((z (mapcar #'car x)))
+ (find 'foobar z)))
+
+ Without (DECLARE (NOTINLINE MAPCAR)), Python cannot derive that Z is
+ LIST.
+
+236: "THE semantics is broken"
+
+ (defun foo (a f)
+ (declare (optimize (speed 2) (safety 0)))
+ (+ 1d0
+ (the double-float
+ (multiple-value-prog1
+ (svref a 0)
+ (unless f (return-from foo 0))))))
+
+ (foo #(4) nil) => SEGV
+
+ VOP selection thinks that in unsafe code result type assertions
+ should be valid immediately. (See also bug 233a.)
+
+ The similar problem exists for TRULY-THE.
+
+237: "Environment arguments to type functions"
+ a. Functions SUBTYPEP, TYPEP, UPGRADED-ARRAY-ELEMENT-TYPE, and
+ UPGRADED-COMPLEX-PART-TYPE now have an optional environment
+ argument, but they ignore it completely. This is almost
+ certainly not correct.
+ b. Also, the compiler's optimizers for TYPEP have not been informed
+ about the new argument; consequently, they will not transform
+ calls of the form (TYPEP 1 'INTEGER NIL), even though this is
+ just as optimizeable as (TYPEP 1 'INTEGER).
+
+238: "REPL compiler overenthusiasm for CLOS code"
+ From the REPL,
+ * (defclass foo () ())
+ * (defmethod bar ((x foo) (foo foo)) (call-next-method))
+ causes approximately 100 lines of code deletion notes. Some
+ discussion on this issue happened under the title 'Three "interesting"
+ bugs in PCL', resulting in a fix for this oververbosity from the
+ compiler proper; however, the problem persists in the interactor
+ because the notion of original source is not preserved: for the
+ compiler, the original source of the above expression is (DEFMETHOD
+ BAR ((X FOO) (FOO FOO)) (CALL-NEXT-METHOD)), while by the time the
+ compiler gets its hands on the code needing compilation from the REPL,
+ it has been macroexpanded several times.
+
+ A symptom of the same underlying problem, reported by Tony Martinez:
+ * (handler-case
+ (with-input-from-string (*query-io* " no")
+ (yes-or-no-p))
+ (simple-type-error () 'error))
+ ; in: LAMBDA NIL
+ ; (SB-KERNEL:FLOAT-WAIT)
+ ;
+ ; note: deleting unreachable code
+ ; compilation unit finished
+ ; printed 1 note
+
+241: "DEFCLASS mysteriously remembers uninterned accessor names."
+ (from tonyms on #lisp IRC 2003-02-25)
+ In sbcl-0.7.12.55, typing
+ (defclass foo () ((bar :accessor foo-bar)))
+ (profile foo-bar)
+ (unintern 'foo-bar)
+ (defclass foo () ((bar :accessor foo-bar)))
+ gives the error message
+ "#:FOO-BAR already names an ordinary function or a macro."
+ So it's somehow checking the uninterned old accessor name instead
+ of the new requested accessor name, which seems broken to me (WHN).
+
+242: "WRITE-SEQUENCE suboptimality"
+ (observed from clx performance)
+ In sbcl-0.7.13, WRITE-SEQUENCE of a sequence of type
+ (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (*)) on a stream with element-type
+ (UNSIGNED-BYTE 8) will write to the stream one byte at a time,
+ rather than writing the sequence in one go, leading to severe
+ performance degradation.
+
+243: "STYLE-WARNING overenthusiasm for unused variables"
+ (observed from clx compilation)
+ In sbcl-0.7.14, in the presence of the macros
+ (DEFMACRO FOO (X) `(BAR ,X))
+ (DEFMACRO BAR (X) (DECLARE (IGNORABLE X)) 'NIL)
+ somewhat surprising style warnings are emitted for
+ (COMPILE NIL '(LAMBDA (Y) (FOO Y))):
+ ; in: LAMBDA (Y)
+ ; (LAMBDA (Y) (FOO Y))
+ ;
+ ; caught STYLE-WARNING:
+ ; The variable Y is defined but never used.
+
+244: "optimizing away tests for &KEY args of type declared in DEFKNOWN"
+ (caught by clocc-ansi-test :EXCEPSIT-LEGACY-1050)
+ In sbcl-0.pre8.44, (OPEN "foo" :DIRECTION :INPUT :EXTERNAL-FORMAT 'FOO)
+ succeeds with no error (ignoring the bogus :EXTERNAL-FORMAT argument)
+ apparently because the test is optimized away. The problem doesn't
+ exist in sbcl-0.pre8.19. Deleting the (MEMBER :DEFAULT) declaration
+ for :EXTERNAL-FORMAT in DEFKNOWN OPEN (and LOAD) is a workaround for
+ the problem (and should be removed when the problem is fixed).
+
+245: bugs in disassembler
+ a. On X86 an immediate operand for IMUL is printed incorrectly.
+ b. On X86 operand size prefix is not recognized.
+
+246: "NTH-VALUE scaling problem"
+ NTH-VALUE's current implementation for constant integers scales in
+ compile-time as O(n^4), as indeed must the optional dispatch
+ mechanism on which it is implemented. While it is unlikely to
+ matter in real user code, it's still unpleasant to observe that
+ (NTH-VALUE 1000 (VALUES-LIST (MAKE-LIST 1001))) takes several hours
+ to compile.
+
+248: "reporting errors in type specifier syntax"
+ (TYPEP 1 '(SYMBOL NIL)) says something about "unknown type
+ specifier".