Skip to content
Tcl Source Code History Of Ticket 66ffafd309111bc7
Login

History Of Ticket 66ffafd309111bc7

Artifacts Associated With Ticket 66ffafd309111bc7

  1. Ticket change [b9e716237f] (rid 216101) by apnadkarni on 2023-07-01 12:54:55:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      ```
      % encoding convertfrom gb12345 x
      ```
      
      will run out of memory.
      
    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: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "11. Conversions from String"
    15. title initialized to:
      Truncated encoding for DBCS results in infinite loop and running out of memory
      
    16. type initialized to: "Bug"
  2. Ticket change [0f0b439b8f] (rid 216102) by apnadkarni on 2023-07-01 12:59:30:

    1. assignee changed to: "apnadkarni"
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  3. Ticket change [767c6f6499] (rid 216104) by apnadkarni on 2023-07-01 13:55:03:

    1. icomment:
      Same test with 8.7
      
      ```
      % encoding convertfrom gb12345 x
      unexpected byte sequence starting at index 0: '\x78'
      ```
      
      No infinite loop but still not what I would expect. With the default tcl8 profile, should not raise an error but instead store U+FFFD as is done for other encodings in case of truncation. For example,
      
      ```
      % codep [encoding convertfrom utf-16 x]
      U+00FFFD
      ```
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  4. Ticket change [6f0c9e411d] (rid 216106) by chrstphrchvz on 2023-07-01 15:13:43:

    1. icomment:
      In case it is related, note that [1bd796d9c2] also describes an infinite loop/memory exhaustion during <tt>enconding convertfrom</tt>.
      
    2. login: "chrstphrchvz"
    3. mimetype: "text/x-fossil-wiki"
  5. Ticket change [36470d644b] (rid 216107) by apnadkarni on 2023-07-01 16:24:20:

    1. icomment:
      Thanks but this is different. Seems to be related to this [fix](https://core.tcl-lang.org/tcl/info/f96ef976ee881560) for this [ticket](https://core.tcl-lang.org/tcl/tktview/bdcb5126c0).
      
      Working on it.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  6. Ticket change [86d848137c] (rid 216125) by apnadkarni on 2023-07-02 05:28:57:

    1. closedate changed to: "2460127.72844192"
    2. closer changed to: "apnadkarni"
    3. icomment:
      Fixed in [ffe33a7797] for 9.0 and [4d10e2c128] for 8.7.
      
      Invalid / trailing truncated DBCS bytes are now mapped to same byte value (as is done for utf-8) when the tcl profile is in effect. 8.7 does not raise an error any more.
      
    4. login: "apnadkarni"
    5. mimetype: "text/x-fossil-plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  7. Ticket change [2c0dad7e89] (rid 216258) by jan.nijtmans on 2023-07-05 14:59:10:

    1. closedate changed to: "2460131.12442398"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Trying the same in 8.6, "encoding convertfrom gb12345 x" gives the empty result which is equally surprising: Silently skipping bytes is never a good idea.
      
      Therefore, I now backported the related changes to 8.6 as well [759e76383f6d8b51|here]
      
      Many thanks for tracking this down!
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"