Skip to content
Tcl Source Code History Of Ticket 135804138e33ff05
Login

History Of Ticket 135804138e33ff05

Artifacts Associated With Ticket 135804138e33ff05

  1. Ticket change [83c0da4d73] (rid 176997) by pooryorick on 2019-11-13 21:20:59:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. 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>
      
    5. is_private initialized to: "0"
    6. login: "pooryorick"
    7. priority initialized to: "5 Medium"
    8. resolution initialized to: "None"
    9. severity initialized to: "Minor"
    10. status initialized to: "Open"
    11. submitter initialized to: "pooryorick"
    12. subsystem initialized to: "35. TclOO Package"
    13. 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]
      
    14. type initialized to: "Bug"
  2. Ticket change [7a7347db21] (rid 176998) by aku on 2019-11-13 21:32:40:

    1. icomment:
      I do not see where/how `m2` is invoked.
      And it seems to be an incomplete method definition as well.
      
    2. login: "aku"
    3. mimetype: "text/plain"
  3. Ticket change [2b003b1e12] (rid 176999) by aku on 2019-11-13 21:35:26:

    1. 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
      
    2. login: "aku"
    3. mimetype: "text/plain"
  4. Ticket change [6648696fde] (rid 177000) by pooryorick on 2019-11-14 09:43:25:

    1. 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>
      
    2. login: "pooryorick"
    3. mimetype: "text/x-fossil-wiki"
  5. Ticket change [cb03b664de] (rid 177006) by sebres on 2019-11-14 14:46:10:

    1. assignee changed to: "sebres"
    2. 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>
      
    3. login: "sebres"
    4. mimetype: "text/plain"
  6. Ticket change [45c0f4109c] (rid 177010) by pooryorick on 2019-11-14 14:49:48:

    1. login: "pooryorick"
    2. mimetype: "text/plain"
    3. 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]
      
  7. Ticket change [4965e7034f] (rid 177019) by sebres on 2019-11-14 17:22:34:

    1. 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.
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Fixed"
    5. status changed to: "Pending"
  8. Ticket change [1a203f3ea1] (rid 177025) by pooryorick on 2019-11-14 19:36:01:

    1. closedate changed to: "2458802.31668464"
    2. closer changed to: "pooryorick"
    3. login: "pooryorick"
    4. mimetype: "text/plain"
    5. status changed to: "Closed"