Skip to content
Tcl Source Code History Of Ticket ebc39f14d7
Login

History Of Ticket ebc39f14d7

Artifacts Associated With Ticket ebc39f14d7

  1. Ticket change [6e7ae8b876] (rid 238645) by sebres on 2025-03-25 01:14:34:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      The command of OO-object will be always created using a rename/delete trace, that has a lot of adverse consequences:
      <ol>
        <li>additional alloc/free per object</li>
        <li>unneeded effort by deletion due to untrace procedure</li>
        <li>tracing of command may cause extra overhead by evaluation, and needlessly burden the invocation of object and its methods</li>
        <li>due to this retarded by design clean-up via trace (and only one refCount for cmdPtr stored in object), it may cause usage after free for deleted oPtr->command (with Tcl_DeleteCommandFromToken, if it was last reference to the time of call ObjectNamespaceDeleted)</li>
        <li>oPtr->refCount is initially 2, with further cons, like potential leaks (either trace or command isn't involved in this refCount, otherwise it'd be 3 and not 2) or dereferencing by deletion is not really "atomic" or else may be semi-finished by refCount = 1;</li>
        <li>the trace is basically not really needed, because:
        <ul>
          <li>for deletion there is deleteProc-callback that one could set directly by creating of the OO-command</li>
          <li>and renaming trace is currently used only to clean oPtr->cachedNameObj (if it is therel), this can be achieved by different approach, e.g. by checking of cmdEpoch (which gets incremented by rename) inside the TclOOObjectName);</li>
        </ul>
        </li>
      </ol>
      
      
      I'll provide new branch without tracing in OO.
      
    5. foundin initialized to: "8.6+"
    6. is_private initialized to: "0"
    7. login: "sebres"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "50e9528765c18296566374b3fde2df942c394efd"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "sebres"
    14. subsystem initialized to: "35. TclOO Package"
    15. title initialized to: "OO-command implicit tracing"
    16. type initialized to: "Bug"
  2. Ticket change [ccb0466d51] (rid 238646) by sebres on 2025-03-25 01:16:13:

    1. comment changed to:
      The command of OO-object will be always created together with a rename/delete trace, that has a lot of adverse consequences:
      <ol>
        <li>additional alloc/free per object</li>
        <li>unneeded effort by deletion due to untrace procedure</li>
        <li>tracing of command may cause extra overhead by evaluation, and needlessly burden the invocation of object and its methods</li>
        <li>due to this retarded by design clean-up via trace (and only one refCount for cmdPtr stored in object), it may cause usage after free for deleted oPtr->command (with Tcl_DeleteCommandFromToken, if it was last reference to the time of call ObjectNamespaceDeleted)</li>
        <li>oPtr->refCount is initially 2, with further cons, like potential leaks (either trace or command isn't involved in this refCount, otherwise it'd be 3 and not 2) or dereferencing by deletion is not really "atomic" or else may be semi-finished by refCount = 1;</li>
        <li>the trace is basically not really needed, because:
        <ul>
          <li>for deletion there is deleteProc-callback that one could set directly by creating of the OO-command</li>
          <li>and renaming trace is currently used only to clean oPtr->cachedNameObj (if it is therel), this can be achieved by different approach, e.g. by checking of cmdEpoch (which gets incremented by rename) inside the TclOOObjectName);</li>
        </ul>
        </li>
      </ol>
      
      
      I'll provide new branch without tracing in OO.
      
    2. login: "sebres"
    3. mimetype: "text/plain"