Artifacts Associated With Ticket 66ffafd309111bc7
Ticket change [b9e716237f] (rid 216101) by apnadkarni on 2023-07-01 12:54:55:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-markdown"
- comment initialized to:
``` % encoding convertfrom gb12345 x ``` will run out of memory.
- foundin initialized to: "9.0"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "11. Conversions from String"
- title initialized to:
Truncated encoding for DBCS results in infinite loop and running out of memory
- type initialized to: "Bug"
Ticket change [0f0b439b8f] (rid 216102) by apnadkarni on 2023-07-01 12:59:30:
- assignee changed to: "apnadkarni"
- login: "apnadkarni"
- mimetype: "text/plain"
Ticket change [767c6f6499] (rid 216104) by apnadkarni on 2023-07-01 13:55:03:
- 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 ```
- login: "apnadkarni"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [6f0c9e411d] (rid 216106) by chrstphrchvz on 2023-07-01 15:13:43:
- icomment:
In case it is related, note that [1bd796d9c2] also describes an infinite loop/memory exhaustion during <tt>enconding convertfrom</tt>.
- login: "chrstphrchvz"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [36470d644b] (rid 216107) by apnadkarni on 2023-07-01 16:24:20:
- 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.
- login: "apnadkarni"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [86d848137c] (rid 216125) by apnadkarni on 2023-07-02 05:28:57:
- closedate changed to: "2460127.72844192"
- closer changed to: "apnadkarni"
- 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.
- login: "apnadkarni"
- mimetype: "text/x-fossil-plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [2c0dad7e89] (rid 216258) by jan.nijtmans on 2023-07-05 14:59:10:
- closedate changed to: "2460131.12442398"
- closer changed to: "jan.nijtmans"
- 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!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"