Opened 5 years ago
Last modified 3 years ago
#479 new defect
CLOS MOP bug in 1.8.0
| Reported by: | Mark Evenson | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.9.2 |
| Component: | (A)MOP | Version: | 1.8.1-dev |
| Keywords: | Cc: | ||
| Parent Tickets: |
Description
Pascal Costanza reports in <https://mailman.common-lisp.net/pipermail/armedbear-devel/2020-November/004189.html>:
I have encountered a bug in 1.8.0 when doing my regular Closer to MOP checks. This must be a new bug, because 1.7.1 was fine. Here is the case that triggers the problem:
(use-package :mop)
(defclass test-direct-slot-definition
(standard-direct-slot-definition)
())
(defclass test-effective-slot-definition
(standard-effective-slot-definition)
())
(defclass test-class (standard-class) ())
(defmethod validate-superclass
((class test-class)
(superclass standard-class))
t)
(defmethod direct-slot-definition-class
((class test-class) &rest initargs)
(declare (ignore initargs))
(find-class 'test-direct-slot-definition))
(defmethod effective-slot-definition-class
((class test-class) &rest initargs)
(declare (ignore initargs))
(find-class 'test-effective-slot-definition))
(defclass test-object ()
((some-slot :accessor some-slot
:initarg :some-slot
:initform 'some-slot
:type symbol
:allocation :class
:documentation "a slot"))
(:metaclass test-class))
(unless (class-finalized-p (find-class 'test-object))
(finalize-inheritance (find-class 'test-object)))
Armed Bear Common Lisp 1.8.0
Java 15.0.1 Oracle Corporation
Java HotSpot(TM) 64-Bit Server VM
Low-level initialization completed in 0.134 seconds.
Startup completed in 0.65 seconds.
Loading /Users/costanza/.abclrc completed in 6.061 seconds.
Type ":help" for a list of available commands.
CL-USER(1): (load "test.lisp")
Error loading /Users/costanza/Temp/test.lisp at line 36 (offset 943)
#<THREAD "interpreter" {1970D65C}>: Debugger invoked on condition of type UNBOUND-SLOT
The slot LOCATION is unbound in the object #<TEST-EFFECTIVE-SLOT-DEFINITION {556F331F}>.
Restarts:
0: TOP-LEVEL Return to top level.
[1] CL-USER(2): :bt
0: (SYSTEM:BACKTRACE)
1: (INVOKE-DEBUGGER #<UNBOUND-SLOT {67D22A29}>)
2: (ERROR
UNBOUND-SLOT
:INSTANCE
#<TEST-EFFECTIVE-SLOT-DEFINITION {556F331F}>
:NAME
SYSTEM::LOCATION)
3: (#<FUNCTION #<FUNCTION {22446549}> {22446549}>
(#<STANDARD-CLASS TEST-EFFECTIVE-SLOT-DEFINITION {6670307A}>
#<TEST-EFFECTIVE-SLOT-DEFINITION {556F331F}> SYSTEM::LOCATION))
4: (SLOT-VALUE
#<TEST-EFFECTIVE-SLOT-DEFINITION {556F331F}>
SYSTEM::LOCATION)
5: (SLOT-DEFINITION-LOCATION
#<TEST-EFFECTIVE-SLOT-DEFINITION {556F331F}>)
6: (MOP::STD-FINALIZE-INHERITANCE #<TEST-CLASS TEST-OBJECT {67510DAF}>)
7: (#<FUNCTION #<FUNCTION {2C5408FE}> {2C5408FE}>
(#<TEST-CLASS TEST-OBJECT {67510DAF}>))
I believe the bug is triggered by find-class or class-finalized-p, but not sure.
Attachments (1)
Change History (5)
comment:1 Changed 5 years ago by
comment:3 Changed 5 years ago by
Triaged to failing with work on making CLOS CALL-NEXT-METHOD an FLET form in <https://abcl.org/trac/changeset/15459> and <https://abcl.org/trac/changeset/15427>
comment:4 Changed 3 years ago by
| Milestone: | 1.8.1 → 1.9.2 |
|---|
Note: See
TracTickets for help on using
tickets.
Reversing the patches <https://abcl.org/trac/changeset/15427> <https://abcl.org/trac/changeset/15459> causes this to work again. I currently suspect that the rewrite of the COMPUTE-METHOD-FAST-FUNCTION was incorrect.