Opened 14 years ago
Closed 12 years ago
#113 closed defect (fixed)
DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT
Reported by: | mseddon | Owned by: | Mark Evenson |
---|---|---|---|
Priority: | critical | Milestone: | 1.1.0 |
Component: | java | Version: | |
Keywords: | needs-test | Cc: | |
Parent Tickets: |
Description
CL-USER(1): (defstruct foo x y)
FOO
CL-USER(2): (defstruct foo x y z)
FOO
CL-USER(3): (make-foo :x 1 :y 2 :z 3)
ABCL Debug.assertTrue() assertion failed!
java.lang.Error: ABCL Debug.assertTrue() assertion failed!
at org.armedbear.lisp.Debug.assertTrue(Debug.java:46)
at org.armedbear.lisp.StructureObject?.writeToString(StructureObject?.java
:483)
Multiple DEFSTRUCTs do not change the underlying structure class, but seem to cause StructureObject? to assert if the new (almost ignored) definition had a different number of slots than the old.
For example, while the above example crashes out ABCL, the following example does not:
CL-USER(1): (defstruct foo a b c)
FOO
CL-USER(2): (defstruct foo x y z)
FOO
CL-USER(3): (make-foo :x 1 :y 2 :z 3)
#S(FOO :A 1 :B 2 :C 3)
Change History (10)
comment:1 Changed 14 years ago by
Summary: | DEFSTRUCT redefinition can crash ABCL on MAKE-FOO → DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT |
---|
comment:2 Changed 13 years ago by
Milestone: | → 0.27 |
---|
comment:3 Changed 13 years ago by
Milestone: | 0.27 → 0.28 |
---|---|
Priority: | minor → critical |
comment:5 Changed 13 years ago by
Milestone: | 0.28 → 1.0.1 |
---|
comment:6 Changed 13 years ago by
Keywords: | needs-test added; needs_test removed |
---|---|
Milestone: | 1.0.1 → 1.1.0 |
comment:7 Changed 13 years ago by
Milestone: | 1.1.0 → 1.0.2 |
---|
comment:8 Changed 13 years ago by
Milestone: | 1.0.2 → 1.1.0 |
---|---|
Owner: | changed from nobody to Mark Evenson |
Status: | new → assigned |
comment:9 Changed 12 years ago by
Problem is that we have DEFSTRUCTs in our code; we can't just reject redefinition, because that'd negatively interact with our current bootstrapping procedure.
Analysis of other implementations:
- SBCL offers a restart Continue/recklessly-continue/Abort
- clisp just continues
The solution we want to see implemented is: detect differences in definition and offer a restart to continue (change it).
This doesn't affect our bootstrapping since we always define to the same definition.
comment:10 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Still present: