The value NIL is not of type SB-C::IR2-LVAR

Bug #1720874 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

On same snapshot build as previous bug. From random testing.

(defun foo (a)
  (dotimes (iv2 2 a)
    (logand
     (flet ((%f17 (f17-1 f17-2)
              f17-2))
       (common-lisp:handler-case
           (apply #'%f17 (list (%f17 0 0) 0))
         )))))

The value
  NIL
is not of type
  SB-C::IR2-LVAR
   [Condition of type TYPE-ERROR]

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

Backtrace:
  0: (SB-C::MOVE-LVAR-RESULT #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::CLAMBDA :%SOURCE-NAME %F17 :%DEBUG-NAME # :KIND NIL :TYPE #<SB-KERNEL:FUN-TYPE #> :WHERE-FROM :DEFINED :VARS # {10056A3793}>..
  1: (SB-C::IR2-CONVERT-LOCAL-KNOWN-CALL #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::CLAMBDA :%SOURCE-NAME %F17 :%DEBUG-NAME # :KIND NIL :TYPE #<SB-KERNEL:FUN-TYPE #> :WHERE-FROM :DEFINED :VARS # {..
  2: (SB-C::IR2-CONVERT-LOCAL-CALL #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::CLAMBDA :%SOURCE-NAME %F17 :%DEBUG-NAME # :KIND NIL :TYPE #<SB-KERNEL:FUN-TYPE #> :WHERE-FROM :DEFINED :VARS # {10056A..
  3: (SB-C::IR2-CONVERT-BLOCK #<SB-C::CBLOCK 9 :START c2 {10056A51A3}>)
  4: (SB-C:IR2-CONVERT #<SB-C:COMPONENT :NAME (SB-C::XEP (FLET %F17 :IN FOO)) {10056B5423}>)
  5: (SB-C::%COMPILE-COMPONENT #<SB-C:COMPONENT :NAME (SB-C::XEP (FLET %F17 :IN FOO)) {10056B5423}>)
  6: (SB-C::COMPILE-COMPONENT #<SB-C:COMPONENT :NAME (SB-C::XEP (FLET %F17 :IN FOO)) {10056B5423}>)
  7: (SB-C::%COMPILE (SB-INT:NAMED-LAMBDA FOO (A) (BLOCK FOO (DOTIMES # #))) #<SB-C::CORE-OBJECT {100569EAF3}> :NAME NIL :PATH (SB-C::ORIGINAL-SOURCE-START 0 0))
  8: ((FLET "WITHOUT-INTERRUPTS-BODY-29" :IN SB-THREAD::CALL-WITH-RECURSIVE-LOCK))
  9: (SB-THREAD::CALL-WITH-RECURSIVE-LOCK #<CLOSURE (FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK :IN SB-C::ACTUALLY-COMPILE) {7FFFF1EB721B}> #<SB-THREAD:MUTEX "World Lock" owner: #<SB-THREAD:THREAD "main thr..
 10: ((LAMBDA NIL :IN SB-C::ACTUALLY-COMPILE))
 11: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
 12: (SB-C::ACTUALLY-COMPILE NIL (SB-INT:NAMED-LAMBDA FOO (A) (BLOCK FOO (DOTIMES # #))) #<NULL-LEXENV> NIL NIL T)
[...]

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

I'll add that a bug something like this came up before, "in the wild" (search for IR2-LVAR in bugs).

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Bug title has a typo. Should be SB-C::..., not SB-CL:...

Revision history for this message
Stas Boukarev (stassats) wrote :

Not that it's important, but you can edit bug titles.

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Ok, done. :)

summary: - The value NIL is not of type SB-CL:IR2-LVAR
+ The value NIL is not of type SB-C::IR2-LVAR
Revision history for this message
Stas Boukarev (stassats) wrote :

In 7aa16ffc71fb5c04458297978292daa7f3f37dac.

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats)
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.