Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ffba36dc2ba9c9ab91670452f951ddad399f31d7470d0f1931b0cfadf2d0d126
Ticket: 29e8848eb9766b81413989ad8125b0c22d1d2c7e
calling an imported alias in a deletion trace on the alias causes Tcl to cycle on routine resolution
User & Date: sebres on 2020-08-10 19:17:53
Changes

  1. icomment:
    @Nathan: Is the fix [7eed2baf73] really fulfilled? Looks a bit strange.
    
    Because a new flag <code>CMD_DEAD</code> checking in tclBasic (EvalObjvCore) now will be nowhere set :)
    Either you wanted set it in 3271 (instead of <code>CMD_IS_DELETED</code>)... Or it is even enough, and a new flag (as well as a check for deleted) is unneeded at all.
    
    In this case alternative diff (doing the same as your code without new flag CMD_DEAD) relative previous version would be something like that:
    <pre><code>
    <b style="color:blue">@@ -4331,13 +4331,9 @@ EvalObjvCore(</b>
              * Caller gave it to us.
              */
     
    <b style="color:red">-	if (!(preCmdPtr->flags & CMD_IS_DELETED)) {
    -	    /*
    -             * So long as it exists, use it.
    -             */
    -
    -	    cmdPtr = preCmdPtr;
    -	} else if (flags & TCL_EVAL_NORESOLVE) {</b>
    <b style="color:green">+	if ( (flags & TCL_EVAL_NORESOLVE)
    +	  && (preCmdPtr->flags & CMD_IS_DELETED)
    +	) {</b>
     	    /*
     	     * When it's been deleted, and we're told not to attempt resolving
     	     * it ourselves, all we can do is raise an error.
    <b style="color:blue">@@ -4348,6 +4344,7 @@ EvalObjvCore(</b>
     	    Tcl_SetErrorCode(interp, "TCL", "EVAL", "DELETEDCOMMAND", NULL);
     	    return TCL_ERROR;
     	}
    <b style="color:green">+	cmdPtr = preCmdPtr;</b>
         }
         if (cmdPtr == NULL) {
     	cmdPtr = TEOV_LookupCmdFromObj(interp, objv[0], lookupNsPtr);
    </code></pre>
    
    Just...<br/>
    @all: it looks like [./artifact?name=4cd056636cb5020b&ln=4340-4350|this code] is not covered at all (or I can simply not find the test case covering that).
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"