DEFUN + DEFINE-CONDITION = attempt to dump reference to obsolete class

Bug #1761950 reported by Michał Herda on 2018-04-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

Attempting to C-c C-c the following form in slime:

(defun test () (define-condition foo () ()))

produces:

Execution of a form compiled with errors.
Form:
  (SB-IMPL::%DEFUN 'FOO
                 (SB-INT:NAMED-LAMBDA FOO
                     NIL
                   (BLOCK FOO
                     (DEFINE-CONDITION BAR
                         NIL
                         NIL))))
Compile-time error:
  attempt to dump reference to obsolete class: #<SB-KERNEL::UNDEFINED-CLASSOID BAR>
   [Condition of type SB-INT:COMPILED-PROGRAM-ERROR]

Restarts:
 0: [ABORT] Abort compilation.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "worker" RUNNING {1004DCBE33}>)

Backtrace:
  0: (SB-FASL::LOAD-FASL-GROUP #S(SB-FASL::FASL-INPUT :STREAM #<SB-SYS:FD-STREAM for "file /tmp/slimeb6FR4I.fasl" {1004ED2243}> :TABLE #(17 #<PACKAGE "SB-IMPL"> SB-IMPL::%DEFUN #<PACKAGE "PROTEST/BASE"> FO..
  1: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file /tmp/slimeb6FR4I.fasl" {1004ED2243}> NIL NIL)
  2: ((FLET SB-FASL::THUNK :IN LOAD))
  3: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<CLOSURE (FLET SB-FASL::THUNK :IN LOAD) {7FFFF64FDBFB}> #<SB-SYS:FD-STREAM for "file /tmp/slimeb6FR4I.fasl" {1004ED2243}>)
  4: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) #<SB-SYS:FD-STREAM for "file /tmp/slimeb6FR4I.fasl" {1004ED2243}> T)
  5: (LOAD #P"/tmp/slimeb6FR4I.fasl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST T :EXTERNAL-FORMAT :DEFAULT)
  6: ((FLET SWANK/BACKEND:CALL-WITH-COMPILATION-HOOKS :IN "/home/phoe/.emacs.d/elpa/develop/slime-20171207.1712/swank/sbcl.lisp") #<CLOSURE (LAMBDA NIL :IN SWANK/BACKEND:SWANK-COMPILE-STRING) {1004EC7CFB}>..
  7: ((FLET SWANK/BACKEND:SWANK-COMPILE-STRING :IN "/home/phoe/.emacs.d/elpa/develop/slime-20171207.1712/swank/sbcl.lisp") "(defun foo () (define-condition bar () ())) ..)
  8: ((LAMBDA NIL :IN SWANK:COMPILE-STRING-FOR-EMACS))
  9: ((LAMBDA NIL :IN SWANK::COLLECT-NOTES))
 --more--

This function is compiled and seems to work normally in the REPL.

Michał Herda (phoe-krk) on 2018-04-07
description: updated
summary: - DEFINE-CONDITION + SETF FIND-CLASS NIL = attempt to dump reference to
- obsolete class
+ DEFUN + DEFINE-CONDITION = attempt to dump reference to obsolete class
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers