Skip to content
Tcl Source Code History Of Ticket 4402cfa58cc1a165
Login

History Of Ticket 4402cfa58cc1a165

Artifacts Associated With Ticket 4402cfa58cc1a165

  1. Ticket change [f5d7c006cf] (rid 146098) by dgp on 2016-04-01 03:06:07:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Demo script:
      
      proc bar {ev} {}
      proc bingo {xx} {}
      namespace ensemble create -command launch -map {foo bar event bingo}
      catch {bar} m1; puts $m1
      catch {launch ev} m2; puts $m2
      catch {launch foo} m3; puts $m3
      
      Output:
      
      wrong # args: should be "bar ev"
      wrong # args: should be "launch event xx"
      wrong # args: should be "launch foo event"
      
      
      The final line of output should be:
      
      wrong # args: should be "launch foo ev"
      
    5. foundin initialized to: "trunk"
    6. is_private initialized to: "0"
    7. login: "dgp"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "dgp"
    13. subsystem initialized to: "21. [namespace]"
    14. title initialized to: "Improper ensemble intrep usage"
    15. type initialized to: "Bug"
  2. Ticket change [c42f011af0] (rid 146099) by dgp on 2016-04-01 03:37:40:

    1. comment changed to:
      Demo script:
      
      proc bar {ev} {}
      proc bingo {xx} {}
      namespace ensemble create -command launch -map {foo bar event bingo}
      catch {launch foo} m; puts $m
      catch {launch ev} m; puts $m
      catch {launch foo} m; puts $m
      
      Output:
      
      wrong # args: should be "launch foo ev"
      wrong # args: should be "launch event xx"
      wrong # args: should be "launch foo event"
      
      
      The final line of output should be:
      
      wrong # args: should be "launch foo ev"
      
    2. icomment:
      
      Revised original comment for greater clarity
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  3. Ticket change [8d9ab49650] (rid 146100) by dgp on 2016-04-01 03:42:58:

    1. icomment:
      
      The first {launch foo} is handled correctly.
      
      The {launch ev} is also handled correctly, but
      has the side effect of storing an intrep in the "ev"
      value which keeps a record of both the target
      command prefix in the ensemble ("bingo") and
      the expanded full name of the subcommand
      when it was triggered by an abbreviation ("event").
      The full name of the subcommand is used in
      the error message, even though the script used
      only the abbreviated form.
      
      The final {launch foo} gets things wrong.  When
      an error message is crafted this time and it's time
      to append the string "ev" as part of the usage,
      that value still has the magic intrep, and the
      expanded string is pulled into the error message
      even though that's not correct in this context.
      
      All of this is in Tcl_WrongNumArgs().
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  4. Ticket change [7c1aab3812] (rid 146742) by dgp on 2016-05-18 17:19:28:

    1. icomment:
      This bug centers about an ObjType that caches a lookup.
      
      When it needs to use that lookup, though, the data needed
      to verify that the lookup remains valid are out of scope.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  5. Ticket change [045cc77054] (rid 146743) by dgp on 2016-05-18 17:19:54:

    1. assignee changed to: "dkf"
    2. login: "dgp"
    3. mimetype: "text/plain"
  6. Ticket change [ea30d43453] (rid 146744) by dgp on 2016-05-18 17:25:52:

    1. icomment:
      
      The "interp" argument to Tcl_WrongNumArgs()
      is the only one that even possibly might contain
      a path to finding out whether we're in the midst
      of invoking the ensemble/subcommand that's
      cached in the value, so that the substitution is
      proper.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  7. Ticket change [d836b3ab79] (rid 146759) by dgp on 2016-05-20 15:23:33:

    1. icomment:
      
      Related failure:
      
      % proc target {one two} {}
      % namespace ensemble create -command e2 -map {s2 target}
      ::e2
      % namespace ensemble create -command e1 -map {s1 e2} -parameters foo
      ::e1
      % e1 s2 s1 arg
      wrong # args: should be "e1 s2 s1 one two"
      % e1 [string tolower S] [string tolower S] arg
      wrong # args: should be "e1 s2 s1 one two"
      
      BUT ...
      
      % e1 s s arg
      wrong # args: should be "e1 s2 s2 one two"
      
      Literal sharing plus failure to confirm context
      produces wrong error message.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  8. Ticket change [af71c113b3] (rid 146760) by dgp on 2016-05-20 15:36:43:

    1. icomment:
      
      Try to follow that bad advice:
      
      % e1 s2 s2 1 2
      unknown or ambiguous subcommand "s2": must be s1
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  9. Ticket change [9becc0b538] (rid 146761) by dgp on 2016-05-20 15:41:10:

    1. icomment:
      
      Even with proper context checking, with
      literal sharing it appears that the best
      we could hope for would be:
      
      wrong # args: should be "e1 s2 s one two"
      
      Then at least a second pass would get there:
      
      % e1 s2 s arg
      wrong # args: should be "e1 s2 s1 one two"
      
      Seems that the approach just isn't right in
      the first place, though.
      
      If we want spell-check corrections to the
      expansions of unambiguous prefixes, wouldn't
      it be simpler and more reliable  to overwrite
      elements of the sourceObjs array directly?
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  10. Ticket change [c602a8fa47] (rid 146762) by dgp on 2016-05-20 16:32:26:

    1. icomment:
      
      Problem with that idea is that
      the objv (thus sourceObjs) array
      is const.  Given that, and the potential
      for value sharing, appears we're stuck.
      
      What a mess.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  11. Ticket change [8b2dc8d008] (rid 147408) by dgp on 2016-07-01 20:14:39:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2457571.34351775"
    3. closer changed to: "dgp"
    4. icomment:
      
      Fixed for Tcl 8.6.6+
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
  12. Ticket change [1513c6cc2e] (rid 167803) by dgp on 2018-11-27 20:55:42:

    1. assignee changed to: "dkf"
    2. closedate changed to: "2458450.37202421"
    3. icomment:
      
      I'm told by dkf that a Coverity scan is unhappy with
      the bug fix for this ticket.
      
      That is not too surprising. Upon review, the code is
      a horror of type abuse in order to improvise a scheme
      to store the information needed to fix the bug in a
      struct that has no space for it.
      
      If there's an alternative set of casts to make Coverity
      accept the code, I have no objection to changing to them.
      It's not as if there's any way to make this code type-correct.
      It's intentionally an abuse in order to stuff more things
      into the interp->ensembleRewrite without any changes that
      would resize the Interp struct in the middle.
      
    4. login: "dgp"
    5. mimetype: "text/plain"
  13. Ticket change [0974249610] (rid 167804) by dgp on 2018-11-27 20:58:16:

    1. closedate changed to: "2458450.37379733"
    2. icomment:
      
      Be sure to note the tests namespace-50.[67] that demonstrate
      the bug fixed by these code changes.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  14. Ticket change [b6d1865532] (rid 167813) by dkf on 2018-11-28 11:17:19:

    1. closedate changed to: "2458450.97036162"
    2. closer changed to: "dkf"
    3. icomment:
      Seeing this bug report and its tests is very useful. I'll have a think about a better way to do the code (and yes, I can see why it is a horror anyway).
      
    4. login: "dkf"
    5. mimetype: "text/html"
    6. username: "dkf"
  15. Ticket change [8b92c0fd96] (rid 167817) by dkf on 2018-11-28 15:14:05:

    1. closedate changed to: "2458451.13478669"
    2. icomment:
      <a href="/tcl/info/d8a8738329be111b">That</a> should improve it, making it clearer that we are just stuffing things into <code>tmp</code> for transport, not that those are the real types involved.
      
    3. login: "dkf"
    4. mimetype: "text/html"