#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)
#113: DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT ----------------------+----------------------------------------------------- Reporter: mseddon | Owner: nobody Type: defect | Status: new Priority: minor | Milestone: Component: java | Version: Resolution: | Keywords: ----------------------+-----------------------------------------------------
#113: DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT ---------------------+------------------------------------------------------ Reporter: mseddon | Owner: nobody Type: defect | Status: new Priority: minor | Milestone: 0.27 Component: java | Version: Keywords: | ---------------------+------------------------------------------------------ Changes (by mevenson):
* milestone: => 0.27
#113: DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT ----------------------+----------------------------------------------------- Reporter: mseddon | Owner: nobody Type: defect | Status: new Priority: critical | Milestone: 0.28 Component: java | Version: Keywords: | ----------------------+----------------------------------------------------- Changes (by mevenson):
* priority: minor => critical * milestone: 0.27 => 0.28
Comment:
Still present:
{{{ 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.printObject(StructureObject.java:483) at org.armedbear.lisp.Primitives$pf__write_to_string.execute(Primitives.java:925) at org.armedbear.lisp.Symbol.execute(Symbol.java:785) at org.armedbear.lisp.LispThread.execute(LispThread.java:649) at org.armedbear.lisp.print_object_10.execute(print- object.lisp:47) at org.armedbear.lisp.clos_294.execute(clos.lisp:1976) at org.armedbear.lisp.clos_272.execute(clos.lisp:1728) }}}
#113: DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT ------------------------+--------------------------------------------------- Reporter: mseddon | Owner: nobody Type: defect | Status: new Priority: critical | Milestone: 0.28 Component: java | Version: Keywords: needs_test | ------------------------+--------------------------------------------------- Changes (by mevenson):
* keywords: => needs_test
Comment:
Should be fixed; identify test.
#113: DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT ------------------------+--------------------------------------------------- Reporter: mseddon | Owner: nobody Type: defect | Status: new Priority: critical | Milestone: 1.0.1 Component: java | Version: Keywords: needs_test | ------------------------+--------------------------------------------------- Changes (by mevenson):
* milestone: 0.28 => 1.0.1
#113: DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT ------------------------+--------------------------------------------------- Reporter: mseddon | Owner: nobody Type: defect | Status: new Priority: critical | Milestone: 1.1.0 Component: java | Version: Keywords: needs-test | ------------------------+--------------------------------------------------- Changes (by mevenson):
* keywords: needs_test => needs-test * milestone: 1.0.1 => 1.1.0
#113: DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT ------------------------+--------------------------------------------------- Reporter: mseddon | Owner: nobody Type: defect | Status: new Priority: critical | Milestone: 1.0.2 Component: java | Version: Keywords: needs-test | ------------------------+--------------------------------------------------- Changes (by mevenson):
* milestone: 1.1.0 => 1.0.2
#113: DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT ------------------------+--------------------------------------------------- Reporter: mseddon | Owner: mevenson Type: defect | Status: assigned Priority: critical | Milestone: 1.1.0 Component: java | Version: Keywords: needs-test | ------------------------+--------------------------------------------------- Changes (by mevenson):
* owner: nobody => mevenson * status: new => assigned * milestone: 1.0.2 => 1.1.0
#113: DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT ------------------------+--------------------------------------------------- Reporter: mseddon | Owner: mevenson Type: defect | Status: assigned Priority: critical | Milestone: 1.1.0 Component: java | Version: Keywords: needs-test | ------------------------+---------------------------------------------------
Comment(by ehuelsmann):
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: 1. SBCL offers a restart Continue/recklessly-continue/Abort 2. 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.
#113: DEFSTRUCT redefinition can crash ABCL on MAKE-STRUCT -----------------------+---------------------------------------------------- Reporter: mseddon | Owner: mevenson Type: defect | Status: closed Priority: critical | Milestone: 1.1.0 Component: java | Version: Resolution: fixed | Keywords: needs-test -----------------------+---------------------------------------------------- Changes (by ehuelsmann):
* status: assigned => closed * resolution: => fixed
Comment:
(In [14128]) Fix #113 (redefinition of structures can crash ABCL) by failing the redefinition if the two structure definitions are not equalp.
armedbear-ticket@common-lisp.net