#113: DEFSTRUCT redefinition can crash ABCL on MAKE-FOO ---------------------+------------------------------------------------------ Reporter: mseddon | Owner: nobody Type: defect | Status: new Priority: minor | Milestone: Component: java | Version: Keywords: | ---------------------+------------------------------------------------------ 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)