Artifacts Associated With Ticket 135804138e
Ticket change [83c0da4d73] (rid 176997) by pooryorick on 2019-11-13 21:20:59:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
The following script results in a segmentation fault in core-8-6-branch: <code><verbatim> oo::class create c1 { method m1 {} {} } oo::class create c2 { superclass c1 destructor { my m1 } method m1 {} { next } m2 {} { rename [self] {} } } c2 create obj1 obj1 m1 </verbatim></code> - is_private initialized to: "0"
- login: "pooryorick"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "pooryorick"
- subsystem initialized to: "35. TclOO Package"
- title initialized to:
TclOO segmentation fault: direct call to a method called by the object destructor, and that deletes the object via [rename] befor calling [next]
- type initialized to: "Bug"
Ticket change [7a7347db21] (rid 176998) by aku on 2019-11-13 21:32:40:
- icomment:
I do not see where/how `m2` is invoked. And it seems to be an incomplete method definition as well.
- login: "aku"
- mimetype: "text/plain"
- icomment:
Ticket change [2b003b1e12] (rid 176999) by aku on 2019-11-13 21:35:26:
- icomment:
I suspect that the script should be: oo::class create c1 { method m1 {} {} } oo::class create c2 { superclass c1 destructor { my m1 } method m1 {} { my m2 next } method m2 {} { rename [self] {} } } c2 create obj1 obj1 m1 - login: "aku"
- mimetype: "text/plain"
- icomment:
Ticket change [6648696fde] (rid 177000) by pooryorick on 2019-11-14 09:43:25:
- icomment:
The initial script is the wrong script. This is the correct script to reproduce the segmentation fault: <code><verbatim> oo::class create c1 { method m1 {} {} } oo::class create c2 { superclass c1 destructor { my m1 } method m1 {} { rename [self] {} next } } c2 create obj1 obj1 m1 </verbatim></code> - login: "pooryorick"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [cb03b664de] (rid 177006) by sebres on 2019-11-14 14:46:10:
- assignee changed to: "sebres"
- comment changed to:
The following script results in a segmentation fault in core-8-6-branch: <code><verbatim> oo::class create c1 { method m1 {} {} } oo::class create c2 { superclass c1 destructor { my m1 } method m1 {} { rename [self] {} next # nextto c1 } } c2 create obj1 obj1 m1 </verbatim></code> - login: "sebres"
- mimetype: "text/plain"
Ticket change [45c0f4109c] (rid 177010) by pooryorick on 2019-11-14 14:49:48:
- login: "pooryorick"
- mimetype: "text/plain"
- title changed to:
TclOO segmentation fault: direct call to a method called by the object destructor, and that deletes the object via [rename] before calling [next]
Ticket change [4965e7034f] (rid 177019) by sebres on 2019-11-14 17:22:34:
- icomment:
Fixed now in branch [/timeline?r=bug-135804138e|bug-135804138e]... I had 2 variants to solve that. In the 1st variant the result of test-case oo-7.10 would be something like: <code><pre style="padding-left:10pt"> <b style="color:red">- delete c2::destructor delete no-self c1::m1 unreachable /c2::destructor no-self 1 {no next method implementation}</b> <b style="color:green">+ delete c2::destructor delete no-self c1::m1 unreachable /c2::destructor no-self c1::m1 unreachable 0 {}</b> </pre></code> So the "next" had successfully called "c1::m1" second time, so it had assumed that only context of object is deleted (not a class in the call chain) and all access to my/self etc would be prohibited anyway, but just because "c1::m1" behaves like a proc (without object context access) it were possible without any issue to call it second time. The interim decision was another variant (as it is currently implemented in branch [/timeline?r=bug-135804138e|bug-135804138e]) is calling of "next" is impossible after object deletion - so it throws an error there. - login: "sebres"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Pending"
- icomment:
Ticket change [1a203f3ea1] (rid 177025) by pooryorick on 2019-11-14 19:36:01:
- closedate changed to: "2458802.31668464"
- closer changed to: "pooryorick"
- login: "pooryorick"
- mimetype: "text/plain"
- status changed to: "Closed"