Skip to content
Tcl Source Code History Of Ticket 3173086
Login

History Of Ticket 3173086

Artifacts Associated With Ticket 3173086

  1. Ticket change [4d13ee56bc] (rid 127003) by dvrsn on 2011-02-04 22:54:19:

    1. assignee initialized to: "nijtmans"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The following code segfaults for me on tcl 8.6b1.2, x86_64 Linux:
      
      set a [string repeat a 102400] ; puts [string length $a]
      set b [string repeat $a 10583] ; puts [string length $b]
      set c [lrepeat 10485 $a]
      puts [string length [list $c $b]]
      
      I suspect it is a hole in the fix for bug 1267380.
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "dvrsn"
    10. subsystem initialized to: "14. List Object"
    11. title initialized to: "large list segfault"
    12. type initialized to: "Bug"
  2. Ticket change [57d5b12301] (rid 117697) by dgp on 2011-02-07 22:29:13:

    1. assignee changed to: "dgp"
    2. priority changed to: "7 High"
  3. Ticket change [27a965d548] (rid 88559) by dgp on 2011-02-07 23:43:02:

    1. icomment:
      reproduced on core-8-5-branch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [f1f2540410] (rid 109445) by dgp on 2011-02-08 00:52:49:

    1. icomment:
      Cause of the problem is that Tcl_ScanCountedElement()
      is returning a negative value, which it is never supposed to do.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [b9efbc1c1b] (rid 129231) by dgp on 2011-02-11 01:56:45:

    1. icomment:
      
      There's a (somewhat) related bug in Tcl_ConvertCountedElement()
      that can only hit those who make use of the documented ability to
      pass in the TCL_DONT_USE_BRACES flag.  It's a bit more work
      than I really want to take on to create a demo test/script because
      we do not yet have a testing command to exercise Tcl_Scan* and
      Tcl_Convert* .  But a text desciption should be clear.
      
      The problem is that TCCE is using solely the BRACES_UNMATCHED
      flag to determine whether or not braces need to be escaped.  This is
      not good enough.  Consider the example where the string rep of the
      list element is the two character sequence \{ ( that is BACKSLASH OPENBRACE, 
      or \u005C\u007B ).
      
      Then Tcl_ScanCountedElement will return back the flags value USE_BRACES.
      Because the open brace is escaped, it contributes no nesting, so there's no
      problem in that string with unmatched braces.  In the usual list building, then,
      The formatted element would be {\{} .  See this at work:
      
      % list \\{
      {\{}
      
      But Tcl_ConvertCountedElement() is supposed to support
      callers who pass in TCL_DONT_USE_BRACES.  When that
      flag is passed in, the formatted element would be \\{ .  The backslash
      gets paired with an escaping backslash due to the flag.  However,
      the open brace does not get escaped becuase TCCE controls that
      choice solely with the BRACES_UNMATCHED flag, which is *not* set.
      
      The problem now is this result fails to pass the validity test spelled out
      in the comments and tested by test util-3.1 that when the formatted version of
      a list element is enclosed in braces, the result must be a valid list.  Various
      list building routines rely on this property.    The string {\\{} is not a valid Tcl
      list.  TCCE fails its mission.
      
      This is of very little importance, becuase only callers passing the TDUB flag
      can trigger the bug, and near as I can tell no such creatures exist.
      
      However, the fix is to make the escaping of braces by TCCE happen
      whenever the TDUB flag is set, no matter whether or not BU is set as
      well.
      
      But then, we discover that the BU flag is never used for anything anywhere,
      and its existence in the properly functioning code is an unnecessary complication.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [849c803b50] (rid 117585) by dkf on 2011-02-11 06:20:24:

    1. icomment:
      Tk uses that combination in the entry validation code.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  7. Ticket change [4ce9e459be] (rid 126974) by dgp on 2011-02-15 02:14:52:

    1. icomment:
      Yes, so a demo of the problem is:
      
      % entry .e -vcmd {string is list {%s}}
      .e
      % .e insert 0 \\{
      % .e validate
      0
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [0ad6c1891b] (rid 113889) by dgp on 2011-02-15 02:46:47:

    1. icomment:
      
      
      File Added - 401630: 3173086.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Add attachment "3173086.patch" [dc90a2c923] (rid 114503) by dgp on 2011-02-15 02:46:47.

  10. Ticket change [8793b58438] (rid 131719) by dgp on 2011-02-15 02:48:33:

    1. icomment:
      Attached a patch to fix the TCCE bug, and
      completely eliminate the unnecessary
      BRACES_UNMATCHED flag.
      
      This doesn't fix the reported bug.  Just
      provides a better starting point.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  11. Ticket change [ebef06df0d] (rid 103622) by dgp on 2011-02-18 04:09:50:

    1. icomment:
      
      
      File Added - 401990: 3173086-2.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  12. Add attachment "3173086-2.patch" [338f0a4e22] (rid 106614) by dgp on 2011-02-18 04:09:50.

  13. Ticket change [36f3f9fb03] (rid 107189) by dgp on 2011-02-18 04:11:53:

    1. icomment:
      
      Attached a new patch which is a significant
      rewrite of the Tcl*(Scan|Convert)*Element()
      system, and revisions to the callers.
      
      This is not in a state ready to commit at the moment,
      as I need to go through and add/update the comments,
      but I wanted to post it so folks can test it, especially to
      examine whether there's any significant performance
      impact in either direction.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  14. Ticket change [62928c8fb5] (rid 92433) by dgp on 2011-02-27 05:25:00:

    1. icomment:
      
      Patch introduces this change of behavior:
      % list \\\\\}
      {\\}}
      
      which fails the nestability rules.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  15. Ticket change [facbd1632c] (rid 91945) by dgp on 2011-05-10 23:10:16:

    1. icomment:
      Updated patch posted to bug-3173086 branch.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  16. Ticket change [4bfe8db41e] (rid 126803) by dgp on 2011-05-11 00:45:00:

    1. icomment:
      fix committed to active branches.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  17. Ticket change [9397b9315d] (rid 105844) by dgp on 2011-05-11 00:45:01:

    1. closedate changed to: "2011-05-10T17:45:01"
    2. closer changed to: "dgp"
    3. icomment:
      
      
      allow_comments - 1
      
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"