Opened 16 years ago
Closed 14 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 by , 16 years ago
| Summary: | DEFSTRUCT redefinition can crash ABCL on MAKE-FOO → DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT |
|---|
comment:2 by , 15 years ago
| Milestone: | → 0.27 |
|---|
comment:3 by , 15 years ago
| Milestone: | 0.27 → 0.28 |
|---|---|
| Priority: | minor → critical |
comment:5 by , 15 years ago
| Milestone: | 0.28 → 1.0.1 |
|---|
comment:6 by , 15 years ago
| Keywords: | needs-test added; needs_test removed |
|---|---|
| Milestone: | 1.0.1 → 1.1.0 |
comment:7 by , 15 years ago
| Milestone: | 1.1.0 → 1.0.2 |
|---|
comment:8 by , 14 years ago
| Milestone: | 1.0.2 → 1.1.0 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:9 by , 14 years ago
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 by , 14 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Still present: