The value NIL is not of type (AND ATOM (NOT NULL))

Bug #1736196 reported by Paul F. Dietz on 2017-12-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
High
Unassigned

Bug Description

(defun f31 ()
  (declare (notinline apply <))
  (flet ((%f (&key (key2
      (progv
   nil
   nil
        (if (< 0)
     0
     (return-from f31 (catch 'ct6 0))))))
    (declare (ignore key2))
    1))
    (apply #'%f nil)))

==>

The value
  NIL
is not of type
  (AND ATOM (NOT NULL))
   [Condition of type TYPE-ERROR]

Restarts:
 0: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: ((LAMBDA (SB-C::CLEANUP) :IN SB-C::MAP-BLOCK-NLXES) #<SB-C::CLEANUP :KIND :UNWIND-PROTECT :MESS-UP #<SB-C::COMBINATION :FUN NIL :ARGS (NIL NIL) {10055281A3}> :INFO (#<SB-C::NLX-INFO :BLOCK #<SB-C::CBL..
  1: (SB-C::MAP-NESTED-CLEANUPS #<CLOSURE (LAMBDA (SB-C::CLEANUP) :IN SB-C::MAP-BLOCK-NLXES) {1005619F5B}> #S(SB-KERNEL:LEXENV :FUNS ((#:CLEANUP-FUN-3 . #) (< . #) (APPLY . #)) :VARS ((#1=#:N-SAVE-BS2 . #)..
  2: (SB-C::FIND-DFO-AUX #<SB-C::CBLOCK 2 :START c8 {1005538613}> #<SB-C::CBLOCK 58 :START c9 {100556FD73}> #<SB-C:COMPONENT :NAME (FLET %F :IN F31) {1005570383}>)
  3: (SB-C::FIND-DFO-AUX #<SB-C::CBLOCK 3 :START c10 {1005602C43}> #<SB-C::CBLOCK 58 :START c9 {100556FD73}> #<SB-C:COMPONENT :NAME (FLET %F :IN F31) {1005570383}>)
  4: (SB-C::FIND-DFO #<SB-C:COMPONENT :NAME (FLET %F :IN F31) {1005570383}>)
  5: (SB-C::DFO-AS-NEEDED #<SB-C:COMPONENT :NAME (FLET %F :IN F31) {1005570383}>)
  6: (SB-C::%COMPILE-COMPONENT #<SB-C:COMPONENT :NAME (FLET %F :IN F31) {1005570383}>)
[...]

Stas Boukarev (stassats) wrote :

Reduced
(defun f ()
  (declare (notinline <))
  (lambda (&key (key
                 (unwind-protect
                      (if (< 0)
                          0
                          (return-from f (catch 'c))))))
    key))

Changed in sbcl:
status: New → Triaged
importance: Undecided → High
Stas Boukarev (stassats) wrote :

In 710cc90fea2d6b8c673f5b001622eb04592c2836

Changed in sbcl:
status: Triaged → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers