Artifacts Associated With Ticket 7346adc50fac47b5
Ticket change [780f5275ad] (rid 240444) by anonymous on 2025-05-25 15:52:49:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I hit an "Illegal instruction" crash while trying to parse old archived usenet posts with the mime library. I can reproduce the issue with a single line: % ::encoding convertfrom iso2022-jp "\x1b\$B\$*;n\$" unable to realloc 82463372083200 bytes Illegal instruction The same code works without crashing in Tcl 8.6.10: % ::encoding convertfrom iso2022-jp "\x1b\$B\$*;n\$" お試 % I have not dug into the C code involved here, but I would suspect that some length calculation has got broken in the 32->64bit transition.
- foundin initialized to: "9.0.1"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Severe"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "11. Conversions from String"
- title initialized to:
Crash with encoding convertfrom iso2022-jp <string with escape sequence>
- type initialized to: "Bug"
Ticket change [2ec8e55d7d] (rid 240447) by apnadkarni on 2025-05-25 16:45:55:
- assignee changed to: "apnadkarni"
- icomment: "Reproduced. Looking into it..."
- login: "apnadkarni"
- mimetype: "text/plain"
Ticket change [c5fb1d84e9] (rid 240450) by apnadkarni on 2025-05-25 17:20:53:
- icomment:
``` % tcl::unsupported::icu convertfrom iso2022-jp "\x1b\$B\$*;n\$" ICU error while decoding. ICU error (11): U_TRUNCATED_CHAR_FOUND ``` so ICU sees the string as not valid but of course that is no excuse for Tcl to go into a tizzy instead of raising an error.
- login: "apnadkarni"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [8dec840a7e] (rid 240463) by apnadkarni on 2025-05-26 05:17:43:
- icomment: "Proposed fix in [0ca96a7829] ready for review."
- login: "apnadkarni"
- mimetype: "text/x-fossil-plain"
Ticket change [4ccfd50a14] (rid 240467) by jan.nijtmans on 2025-05-26 08:02:27:
- icomment:
Good catch! Looks good to me. I agree with handling tcl8 the same as replace here, the tcl 8.6 behavior is simply broken (too). I don't think it's really worth to backport the fix to 8.6 too.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [9c4eabc7fc] (rid 240490) by apnadkarni on 2025-05-26 10:34:54:
- closedate changed to: "2460821.94090567"
- closer changed to: "apnadkarni"
- icomment:
Thanks for the review, Jan and @cgm for the report. Fixed now in [237ff71b86].
- login: "apnadkarni"
- mimetype: "text/x-fossil-plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"