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 | Version: | ||
Submitter: | pooryorick | Created on: | 2019-11-13 21:20:59 | |
Subsystem: | 35. TclOO Package | Assigned To: | sebres | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Closed | Last Modified: | 2019-11-14 19:36:01 | |
Resolution: | Fixed | Closed By: | pooryorick | |
Closed on: | 2019-11-14 19:36:01 | |||
Description: |
The following script results in a segmentation fault in core-8-6-branch:
| |||
User Comments: |
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. 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:
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 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. |
