Uncaught compiler error calling MEMBER with quoted improper list for second argument

Bug #1768263 reported by Paul F. Dietz on 2018-05-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

(compile nil '(lambda (x) (member x '(a . b))))

==>

The value
  B
is not of type
  LIST
   [Condition of type TYPE-ERROR]

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

Backtrace:
  0: ((FLET SB-IMPL::FAST-NTHCDR :IN NTHCDR) 128 (A . B))
  1: (SB-C::TRANSFORM-LIST-ITEM-SEEK MEMBER #<SB-C::LVAR 1 {100D203A53}> #<SB-C::LVAR 2 {100D203B93}> NIL NIL NIL #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME MEMBER :TYPE #..
  2: ((SB-C:DEFTRANSFORM MEMBER) #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME MEMBER :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM :DECLARED :KIND :GLOBAL-F..

Errors like this can occur even in lisp code that is perfectly valid, since the call can be in a branch that is dynamically dead (if the compiler cannot figure this out).

* (compile nil '(lambda (x) (let ((y '(a . b))) (unless (improper-list-p y) (member x y))))) ==> same error

description: updated
Stas Boukarev (stassats) wrote :

9b00cd38854e27a07dd92bc2b5ed846194e6bd02

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

Other bug subscribers