SB-C:LVAR-VALUE used on non-constant LVAR #<SB-C::LVAR 1 {100D912AA3}> (invalid code)

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

Bug Description

(lambda (fn)
  (let (coords)
    (funcall fn (lambda (indices)
                  (setq coords (append indices nil))))
    (make-array (length coords) :initial-contents
                (reverse coords 1503))))

==>

SB-C:LVAR-VALUE used on non-constant LVAR #<SB-C::LVAR 1 {100D912AA3}>
   [Condition of type SIMPLE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD tid=20017 "repl-thread" RUNNING {1000F00003}>)

Backtrace:
  0: (SB-C:LVAR-VALUE #<SB-C::LVAR 1 {100D912AA3}>)
  1: (SB-C::VALID-TRANSFORM-FUN #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME MAKE-ARRAY :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM :DECLARED :KIND :GLOBA..
  2: (SB-C::IR1-OPTIMIZE-COMBINATION #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME MAKE-ARRAY :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM :DECLARED :KIND :..
  3: (SB-C::IR1-OPTIMIZE #<SB-C:COMPONENT :NAME "<unknown>" {100D917DB3}> NIL)
  4: (SB-C::IR1-OPTIMIZE-UNTIL-DONE #<SB-C:COMPONENT :NAME "<unknown>" {100D917DB3}>)
  5: (SB-C::IR1-OPTIMIZE-PHASE-1 #<SB-C:COMPONENT :NAME "<unknown>" {100D917DB3}>)
  6: (SB-C::IR1-PHASES #<SB-C:COMPONENT :NAME "<unknown>" {100D917DB3}>)
  7: (SB-C::COMPILE-COMPONENT #<SB-C:COMPONENT :NAME "<unknown>" {100D917DB3}>)
  8: (SB-C::%COMPILE (LAMBDA (FN) (LET (COORDS) (FUNCALL FN #) (MAKE-ARRAY # :INITIAL-CONTENTS #))) NIL NIL)
[...]

x86-64, "2.4.3.71-e2eadc30b"

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
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.