Skip to content
Tcl Source Code History Of Ticket edb4b065f4
Login

History Of Ticket edb4b065f4

Artifacts Associated With Ticket edb4b065f4

  1. Ticket change [82f4325e0c] (rid 223808) by apnadkarni on 2024-03-27 15:37:36:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      The following crashes Tcl
      
      ```
      % string compare -length 1 "" [binary decode hex 00]
      ...boom...
      ```
      
      Investigating...
      
    5. foundin initialized to: "9.0"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
    10. resolution initialized to: "None"
    11. severity initialized to: "Critical"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to:
      Crash in string compare of empty string against byte array
      
    16. type initialized to: "Bug"
  2. Ticket change [ef7d1c9945] (rid 223813) by apnadkarni on 2024-03-27 16:16:48:

    1. icomment:
      Crash occurs if either -length and -nocase is specified but not otherwise.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  3. Ticket change [9b15c9bd6b] (rid 223814) by apnadkarni on 2024-03-27 16:17:33:

    1. icomment: "Proposed fix in [f5f42a6211]."
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  4. Ticket change [3033c215b8] (rid 223815) by sebres on 2024-03-27 17:24:56:

    1. foundin changed to: ">= 8.7"
    2. icomment:
      The affected versions are basically >= 8.7.<br/>
      And test-cases can be added (cherry-picked) for 8.6 too.
      
    3. login: "sebres"
    4. mimetype: "text/x-fossil-wiki"
  5. Ticket change [c36ae1c17e] (rid 223817) by apnadkarni on 2024-03-27 17:42:54:

    1. icomment: "Fixed in [5d52c6d730]."
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  6. Ticket change [9aaea12ebc] (rid 223818) by apnadkarni on 2024-03-27 17:49:56:

    1. icomment:
      @sebres,
      
      I realized that but given limited time and resources, I do not plan on spending any effort
      
      - working on 8.6 except for actual bugs that are present there
      
      - working on 8.7 unless there is a concrete plan or need to officially release it
      
      Given serious lack of programmers working on Tcl, every bit of work, even the half hour it might take merging / running tests on two platforms before commits, etc. is time better spent on 9.0 or extensions in my view. That's the path I'm taking.
      
      Others may differ.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  7. Ticket change [814c4075fb] (rid 223819) by apnadkarni on 2024-03-27 17:51:58:

    1. icomment:
      Fixed for 9.0 but leaving open since bug has been marked for 8.7 if anyone wants to pursue that.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  8. Ticket change [70980ec1c8] (rid 223820) by sebres on 2024-03-27 17:59:45:

    1. assignee changed to: "sebres"
    2. login: "sebres"
    3. mimetype: "text/plain"
  9. Ticket change [d4d92d7bf3] (rid 223833) by sebres on 2024-03-27 20:46:20:

    1. assignee changed to: "nobody"
    2. closedate changed to: "2460397.36551962"
    3. closer changed to: "sebres"
    4. icomment:
      Fixed for all branches, 8.6 has now the same tests (excepting few compat tweaks).
      
      Thus close.
      
    5. login: "sebres"
    6. mimetype: "text/x-markdown"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
  10. Ticket change [e8e48ba889] (rid 223893) by jan.nijtmans on 2024-03-28 21:27:46:

    1. closedate changed to: "2460398.39429296"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Thanks, @sebres, for backporting. It's highly appreciated!
      
      However, I don't think it's a good idea burdening all other test-cases, determining the encoding, just for a single "string.test" that needs it. Therefore, I reverted this part, sorry! Asciifying the testcase makes it portable for any Tcl version, that's how it should be done IMHO.
      
      Anyway, thanks!
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
  11. Ticket change [718cb197a4] (rid 223895) by sebres on 2024-03-28 22:12:27:

    1. closedate changed to: "2460398.4253209"
    2. closer changed to: "sebres"
    3. icomment:
      Huh?...
      The cost of tcltest::fileEncoding will be approximately 50µs per file.
      What by the 200 files amounts to "burdening" 10 milliseconds.
      
      As for the "asciifying" in [03cf62003a88a5f2] - it is not quite kosher.
      
      Firstly, ab\u7266 is not the same as ab牦 (first is unicode string, another is object with utf-8 bytes), what may change the test, internally.
      Still worse it may look by replacement for ü - \xFC, which is single-byte, and may work for windows with cp1252 as system encoding (and unix with utf-8 by fallback from ascii through cp1252), but may fail for platforms with another single-byte system encodings, not to mention the backport to Tcls where it behaves similar to 8.5 (where \xFC may be bytearray).
      
      Then maybe better something like [encoding convertfrom cp1252 \xFC].
      
      However, if one see the costs... is the effort, difference to 8.7/9.0 (and a removal of, imho, nice feature) justified?
      
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
  12. Ticket change [78a63a42e5] (rid 224259) by sebres on 2024-04-04 12:11:40:

    1. closer changed to: "nobody"
    2. icomment: "@Jan, ping?"
    3. login: "sebres"
    4. mimetype: "text/plain"
    5. status changed to: "Pending"
  13. Ticket change [241e24c107] (rid 224260) by sebres on 2024-04-04 12:20:08:

    1. assignee changed to: "jan.nijtmans"
    2. login: "sebres"
    3. mimetype: "text/plain"
  14. Ticket change [7c63586194] (rid 224262) by jan.nijtmans on 2024-04-04 12:28:23:

    1. icomment:
      Hi Sergey.
      
      I'm holding my objection. In Tcl 8.7 and 9.0, all test-cases are already ran in utf-8 mode, so the benefit of your change is 0.0000%
      
      The only benefit would be in Tcl 8.6, and it only involves 7 test-cases. That way too little to impose this burden on 8.7 and 9.0 IMHO. Those 7 test-cases involve "string equal" which is fed with utf-8 strings anyway: the Ascification (as is done everywhere else in Tcl 8.6 tests) doesn't change the heart of the testcase.
      
      Sorry!
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  15. Ticket change [dcbcc5694f] (rid 224263) by jan.nijtmans on 2024-04-04 12:28:35:

    1. closedate changed to: "2460405.01985513"
    2. closer changed to: "jan.nijtmans"
    3. login: "jan.nijtmans"
    4. mimetype: "text/plain"
    5. status changed to: "Closed"
  16. Ticket change [b595583a93] (rid 224287) by sebres on 2024-04-04 14:29:58:

    1. closedate changed to: "2460405.1041465"
    2. closer changed to: "sebres"
    3. icomment:
      > the Ascification (as is done everywhere else in Tcl 8.6 tests) doesn't change the heart of the testcase.
      
      But it does. If you don't want to consider UTF vs. UNICODE difference (why? the tests may cover different pieces in code and code of 8.6 is different to 8.7/9.0), it should be revisited at least for windows platform with non-cp1252 system encodings, just to illustrate:
      
      ```tcl
      % encoding convertfrom cp1252 \xFC
      ü
      % encoding convertfrom cp1251 \xFC
      ь
      ```
      
    4. login: "sebres"
    5. mimetype: "text/x-markdown"
  17. Ticket change [afb44fb856] (rid 224288) by jan.nijtmans on 2024-04-04 14:45:25:

    1. closedate changed to: "2460405.11487891"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      I think you are totally mistaken. Writing "\xFC" in a script is not decoded using the system-encoding, it's always the +U00FC Unicode code-point. On the other hand, using ü in a script will give a different result depending on the system-encoding. That's why using utf-8 always prevents many unexpected problems.
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"