| Ticket UUID: | 135804138e33ff05b89f06101008113c86156322 | ||
| Title: | TclOO segmentation fault: direct call to a method called by the object destructor, and that deletes the object via [rename] before calling [next] | ||
| Type: | Bug | Created on: | 2019-11-13 21:20:59 |
| Submitter: | pooryorick | Assigned to: | sebres |
| Subsystem: | 35. TclOO Package | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2019-11-14 19:36:01 |
| Status: | Closed | Closed by: | pooryorick |
| Resolution: | Fixed | Closed on: | 2019-11-14 19:36:01 |
| Version: | |||
| Description: | ||||
|
The following script results in a segmentation fault in core-8-6-branch:
| ||||
| User Comments: | ||||
aku added on 2019-11-13 21:32:40:
I do not see where/how `m2` is invoked. And it seems to be an incomplete method definition as well. aku added on 2019-11-13 21:35:26:
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
pooryorick added on 2019-11-14 09:43:25:
The initial script is the wrong script. This is the correct script to reproduce the segmentation fault:
sebres added on 2019-11-14 17:22:34:
Fixed now in branch 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:
The interim decision was another variant (as it is currently implemented in branch bug-135804138e) is calling of "next" is impossible after object deletion - so it throws an error there. | ||||
