Skip to content
Tcl Source Code History Of Ticket c11e0c5ce426ac09
Login

History Of Ticket c11e0c5ce426ac09

Artifacts Associated With Ticket c11e0c5ce426ac09

  1. Ticket change [75979458ab] (rid 182069) by jan.nijtmans on 2020-04-19 10:17:41:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Starting with commit [c18f3f5870fc0b20], The original contract of Tcl_UtfCharComplete() is broken.  It's easy to fix, and the fix has the fix for [27944a3661] as prequisite.
      
      So, there is no test-case yet proving this, I'll come back too this ticket as soon as [27944a3661]  is fixed.
      
    5. foundin initialized to: "8.6 c18f3f5870fc0b20]"
    6. is_private initialized to: "0"
    7. login: "jan.nijtmans"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "jan.nijtmans"
    13. subsystem initialized to: "44. UTF-8 Strings"
    14. title initialized to: "Regression in Tcl_UtfCharComplete"
    15. type initialized to: "Bug"
  2. Ticket change [46ab521d30] (rid 182135) by jan.nijtmans on 2020-04-20 15:27:08:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      Proposed fix in: [21362ee023f0b464].  More testing needed, I'm not 100% sure yet this is what we want. Still need to add more explanation here, why the current core-8-6-branch situation is wrong ....
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
  3. Ticket change [06d3b88ae3] (rid 182179) by jan.nijtmans on 2020-04-21 10:19:25:

    1. icomment:
      OK, the promised explanation. The invariant is that Tcl_UtfCharComplete(src, TCL_UTF_MAX) should always return true. Since TCL_UTF_MAX is the maximum number of bytes Tcl_UtfToUniChar() can advance, supplying a buffer of TCL_UTF_MAX bytes should be enough for Tcl_UtfToUniChar() to advance. This means that the table used by Tcl_UtfCharComplete() can not have any table entry with a value > TCL_UTF_MAX.
      
      Well, I made the same mistake in the TIP #542 implementation. I corrected that in commit [5f382f20565ff8ed] (together with another small improvement, handling byte C1 as invalid).
      
      There's another small cornercase, missed in the TIP #542 implementation. If an extension is compiled with TCL_UTF_MAX=4 while Tcl is built with TCL_UTF_MAX=3, then it might happen that the extension calls Tcl_UtfCharComplete() which then might give the wrong result. For Tcl_UtfToUniChar() special stub entries are created for this purpose, but for Tcl_UtfCharComplete() there are not separate stub entries for TCL_UTF_MAX=3 and TCL_UTF_MAX=4. The easiest fix is supplying a macro for this corner-case. Fixed here: [8d2927e1c43e9c83]
      
      So, let's fix [27944a3661] first, then I'll continue handling this for core-8-6-branch.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [4e7c0f38a9] (rid 183384) by jan.nijtmans on 2020-05-13 20:33:10:

    1. closedate changed to: "2458983.35637458"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Since in core-8-6-branch, Tcl_UtfPrev() and Tcl_UtfNext() now maximum jump TCL_UTF_MAX bytes, the regression mentioned in this ticket is fixed. A little bit different than I thought .... but OK. So, closing.
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"