Can't SET-INFO-VALUE on PCL-internal function

Bug #1890268 reported by Paul F. Dietz
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
New
Undecided
Unassigned

Bug Description

(LAMBDA (x) (DEFMETHOD CLOSE :AFTER ((X (EQL X)) CLASS-OF (&REST JUNK))))

==>

Can't SET-INFO-VALUE on PCL-internal function
   [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 "new-repl-thread" RUNNING {10488B6C33}>)

Backtrace:
  0: (SB-INT:SET-INFO-VALUE (SB-PCL::FAST-METHOD CLOSE :AFTER ((EQL X) T JUNK)) 3 NIL)
  1: (SB-C::IR1-FINALIZE #<SB-C:COMPONENT :NAME (LAMBDA (X)) {1048962D73}>)
  2: (SB-C::IR1-PHASES #<SB-C:COMPONENT :NAME (LAMBDA (X)) {1048962D73}>)
  3: (SB-C::COMPILE-COMPONENT #<SB-C:COMPONENT :NAME (LAMBDA (X)) {1048962D73}>)
  4: (SB-C::%COMPILE (LAMBDA (X) (DEFMETHOD CLOSE :AFTER (# CLASS-OF #))) #<SB-C::CORE-OBJECT {10488D6623}> :NAME NIL :PATH (SB-C::ORIGINAL-SOURCE-START 0 0))
 [...]

Revision history for this message
Douglas Katzman (dougk) wrote :

well, the syntax there is bad, so this isn't a failure to compile correct code.
The CLOSE method ought to have a keyword arg, but this looks like three positional args the third of which is suspiciously named &REST and whose class is named JUNK.
It should have hit the error about mismatched signatures.

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

(defmethod x ((&rest class))) gives the same error.

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

To be clear about this bad syntax: these test cases are generated by recombination of code snippets from existing CL programs (quicklisp and a bunch of non-quicklisp systems downloaded off github, programs from the cmu ai repository, other public domain lisp programs from various sources). No great attempt is made to keep them syntactically well formed, or even read them in their intended packages. However, SBCL's compiler is supposed to never itself signal an error, even on bad code.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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