NIL fell through ETYPECASE expression. Wanted one of (FIXNUM BIGNUM).
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Found using the random tester (SBCL 1.2.5).
(defparameter *f4*
'(lambda (b c)
(declare (optimize (speed 2) (space 0) (safety 0) (debug 1)
(block b8
(flet ((%f7 (&key (key2 (return-from b8 b)))
(logxor key2)))
(logior (%f7) c)))))
#|
* (compile nil *f4*)
debugger invoked on a SB-KERNEL:
#<THREAD "main thread" RUNNING {1003016813}>:
NIL fell through ETYPECASE expression. Wanted one of (FIXNUM BIGNUM).
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-KERNEL:
0]
|#
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
This is due to bad type and constant propagation, at first it things it'll return an integer, then it figures it'll be a constant, but still applies the transform as if it were an integer.
reduced:
( unless x
(return) )
(lambda (c)
(block nil
(flet ((f (x)
(the integer x)))
(logior c (f nil)))))