Skip to content
Tcl Source Code History Of Ticket 983509ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 983509ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 983509ffffffffffffffffffffffffffffffffff

  1. Ticket change [0d7438e116] (rid 114364) by dgp on 2004-07-01 16:05:03:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      Tcl_RegisterConfig() receives a "valEncoding"
      argument that specifies the encoding for
      the string values in the "configuration" table
      of values.  Those values are copied into
      a dictionary, converting to UTF-encoding.
      
      Problem arises when
      Tcl_GetEncoding(NULL, valEncoding)
      returns NULL -- essentially meaning the
      appropriate *.enc file for that encoding could
      not be found.
      
      In that circumstance, T_RC ignores the
      encoding failure, and goes ahead an
      converts the config values according
      to whatever Tcl thinks the system encoding
      is at the moment.  
      
      Since T_GE() failed, we know this cannot
      be the right thing -- we are definitely converting
      based on the wrong encoding -- and worse, we
      can't even predict what wrong thing T_RC
      will do instead.
      
      When the "valEncoding" cannot be found,
      no data should be copied over to the
      dictionary, since it cannot be done correctly.
      Whether [pkgconfig] should also not be defined,
      or whether it should be defined with no data,
      I'm not sure.
      
      
      
      
      
    4. foundin initialized to: "obsolete: 8.5a2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "54. Configuration Reporting"
    10. title initialized to: "Tcl_RegisterConfig ignores encoding failure"
    11. type initialized to: "Bug"
  2. Ticket change [6c16450308] (rid 128438) by andreas_kupries on 2004-07-17 02:25:07:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      We could also 'panic'. This might actually best, because
      something is so seriously wrong that we cannot fix the
      situaiton, IMHO.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  3. Ticket change [5a7fbb598c] (rid 118150) by dgp on 2004-07-17 04:19:20:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      If we take that approach, though,
      I expect a Tclkit built on Tcl 8.5
      to always panic at startup.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [3e539f13e5] (rid 121243) by andreas_kupries on 2004-07-17 04:22:57:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      In other words, an 8.5-based Tclkit is currently always
      using the wrong encoding for the embedded values ?
      
      More pressure on us to understand and untangle the startup,
      encoding, fs, etc, right ?
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  5. Ticket change [472ee9d1d2] (rid 99652) by dgp on 2004-07-17 04:35:34:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      I don't know whether an 8.5-based
      Tclkit is something that exists.
      
      If it did, it could avoid this problem
      by making sure the valEncoding
      value is "utf-8".
      
      If valEncoding were something like
      "iso8859-1", though, then using that
      encoding requires finding the iso8859-1.enc
      file while requires mounting the VFS in
      which that file is found, which requires
      a [package require] of the tclvfs package, 
      which requires creating an interp, which
      includes a call to Tcl_RegisterConfig.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [f1e4c5f9a9] (rid 109440) by andreas_kupries on 2004-07-17 04:44:52:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      AFAIK jcw has not yet tried to build an 8.5 kit. Nor others.
      So this is theoretical right now.
      
      Note: Part of the startup of a tclkit is getting a file
      boot.tcl out of the appended metakit filesystem before the
      regular vfs infrastructure is in place. That is done by
      using direct metakit commands to access the views and
      locate, and read the file. IOW this part has knowledge how
      the mkfs is organized. This piece of tcl code is embedded in
      the code, as a static string.
      
      Given that it might be possible to get the encoding file in
      the same manner, before vfs is in place, by using lower
      layers. I don't remember if we have an API to process an
      encoding stored in a string as opposed to in a file, or channel.
      
      If so this can break the cycle you have described.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  7. Ticket change [852a04d56a] (rid 131273) by dgp on 2004-12-02 08:52:56:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      this is more serious now, since
      the initial encoding search path
      is shorter, and it's more likely
      the required encoding will not
      be available at the time an
      interp is created.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. priority changed to: "7 High"
    5. username: "dgp"
  8. Ticket change [fcc40da697] (rid 108297) by dgp on 2006-03-10 12:21:03:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Are 8.5-based Tclkits 
      available now to start
      testing this?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. username: "dgp"
  9. Ticket change [9d81ad164c] (rid 96317) by andreas_kupries on 2006-03-28 00:03:47:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      I am doing 8.5 builds about once a week currently. The
      builds generate basekits. Do you need binaries, or sources,
      what platforms ?
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  10. Ticket change [e8c6d7a120] (rid 104704) by dgp on 2006-03-28 00:11:42:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      ok, then.
      
      1) implement the "just panic"
         "fix" to the bug reported here.
      
      2) build a tclkit on the patched sources.
      
      3) try to start that tclkit and see 
         whether it panics.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  11. Ticket change [8e3b45e477] (rid 120073) by andreas_kupries on 2006-03-28 00:21:32:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      I should be able to do that.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  12. Ticket change [2dbd9c089b] (rid 119111) by andreas_kupries on 2006-03-28 04:04:58:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Ok, panic seems to be a bad approach. I am not even getting
      to tclkits right now. We are building a cripped tclsh's,
      which are binary patched on install. currently, due to the
      order things are done this crippled shell is used to build
      the tclkits. To prevent problems we set the environment so
      that it will find its library etc. despite the crippling
      (TCL_LIBRARY, LD_LIBRARY_PATH). This is not working anymore.
      The pkg config stuff happens, I guess, before the
      TCL_LIBRARY is used to resolve the location of the
      encodings, and thus it has no encodings and fails. To
      actually get to the tclkits I will likely have to rework the
       buildsystem so that it uses an uncrippled tclsh to run
      tclkit build.
      
      However also, a tclkit is, I think, quite similar to a
      crippled tclsh when it comes to startup and encodings,
      TCL_LIBRARY, etc. So it will very likely panic as well.
      
      I might try the rewrite, but not today anymore. I will have
      to let my subconscious work on this a bit more.
      
      So, what else could be tried ? Just ignoring the call,
      leaving us with tclkit which simply does not have any of the
      data available ? This might actually be feasible, given that
      the information is intended for build environments, a
      portable tclconfig.sh in a way. A tclkit will likely have no
      interest in this at all.
      
      Extreme question: While a sufficient number of TCT members
      voted yes on this, should we nevertheless revisit the
      rationale of the TIP and maybe back the whole complex out of
      8.5 ?
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  13. Ticket change [027785b806] (rid 119653) by dgp on 2006-03-28 04:37:39:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      ask me again after 8.5a4
      is out.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. priority changed to: "7 High"
    5. username: "dgp"
  14. Ticket change [d2058afea1] (rid 113454) by andreas_kupries on 2006-03-28 04:40:57:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      ok.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  15. Ticket change [c5d5169865] (rid 121651) by dgp on 2007-03-12 22:13:17:

    1. assignee changed to: "dkf"
    2. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Is the recent commit
      relevant to this issue?
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  16. Ticket change [ffb44472e2] (rid 108799) by dkf on 2007-03-12 23:10:22:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      This bug would probably trip up the recent commit if the encoding was not found.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  17. Ticket change [ede65af7ba] (rid 103982) by dkf on 2007-03-21 22:47:35:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      FWIW, I think we need a way of embedding more encodings into the Tcl library so that at least the encoding used for config info is always defined (plus a few others, such as iso8859-1 which is needed for binary channels). Like that, we would be able to revert to a Tcl_Panic on failed encoding loading, which is just about the only sane option anyway; if the encoding isn't there, the build went wrong IMO...
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  18. Ticket change [fe1d24ecc0] (rid 108525) by dkf on 2007-11-01 18:33:50:

    1. assignee changed to: "andreas_kupries"
    2. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      iso8859-1 is now embedded directly in the Tcl library. That should allow someone to define a sane(r) fallback strategy.
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  19. Ticket change [4f2db5c1d3] (rid 125781) by andreas_kupries on 2007-11-06 02:39:02:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      Is use of 'iso8859-1' a saner fallback ?
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  20. Ticket change [9f21071a20] (rid 96585) by dkf on 2007-11-06 02:41:08:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Could be. :-)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  21. Ticket change [2012f35a4f] (rid 91253) by andreas_kupries on 2007-11-06 02:46:36:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      Meh :/ Ok. I am coding this up and committing it. It is a 3-liner. Then we can discuss further.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  22. Ticket change [ae0d2f1399] (rid 101566) by andreas_kupries on 2007-11-06 03:00:52:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      Ok. The HEAD now uses 'iso8859-1' as the fall back instead of whatever the system encoding is. Whether this is saner than what we had before is something we can discuss here. Dropping priority however.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. priority changed to: "5 Medium"
    5. username: "andreas_kupries"
  23. Ticket change [39cd2eeb1e] (rid 112451) by dgp on 2007-11-06 03:17:16:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      I haven't fully re-immersed
      myself in this again, but this
      doesn't seem like the right answer.
      
      If valEncoding isn't available, it
      isn't available, and we can't store
      values submitted in that encoding.
      When we store using any other 
      encoding, we necessarily store
      the wrong thing.  I don't see how
      a new wrong answer is better than
      the old wrong answer.
      
      I'll stick to my original
      "no data should be copied"
      prescription.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  24. Ticket change [da61ec97cf] (rid 107773) by andreas_kupries on 2007-11-06 03:32:19:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      And "no data should be copied" is equivalent to a Tcl_Pnic in this location, right?
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  25. Ticket change [23e6837d55] (rid 131016) by dgp on 2007-11-06 03:44:20:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Not explicitly, no.
      
      "No data should be copied" means
      the dictionary for this package
      will have nothing in it.
      
      Consquentially, the corresponding
      [foo::pkgconfig list] would return
      an empty list.
      
      Some scripts might be quite unhappy
      not to find data they're looking for,
      but that would lead to error rather
      than panic.
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  26. Ticket change [466eeabcae] (rid 99518) by dgp on 2007-11-06 03:51:19:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Not explicitly, no.
      
      "No data should be copied" means
      the dictionary for this package
      will have nothing in it.
      
      Consquentially, the corresponding
      [foo::pkgconfig list] would return
      an empty list.
      
      Some scripts might be quite unhappy
      not to find data they're looking for,
      but that would lead to error rather
      than panic.
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  27. Ticket change [7c13549d95] (rid 97016) by andreas_kupries on 2007-11-06 04:07:45:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      Ok, that is also easy to do (now that I am actually looking at the code again). Just conditionalize part of the setup on 'venc != NULL'. Ok. Another round of changes coming up.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  28. Ticket change [e3db7a258f] (rid 87869) by andreas_kupries on 2007-11-06 04:28:48:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      Committed. For a bogus encoding we setup the query command, no extension of the database ... Querying scripts will either see an empty list, or a 'package not known' error.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  29. Ticket change [cd8fcfd3ad] (rid 132650) by dgp on 2013-07-05 16:17:56:

    1. assignee changed to: "aku"
    2. closer changed to: "nobody"
    3. comment changed to:
      Tcl_RegisterConfig() receives a "valEncoding"
      argument that specifies the encoding for
      the string values in the "configuration" table
      of values.  Those values are copied into
      a dictionary, converting to UTF-encoding.
      
      Problem arises when
      Tcl_GetEncoding(NULL, valEncoding)
      returns NULL -- essentially meaning the
      appropriate *.enc file for that encoding could
      not be found.
      
      In that circumstance, T_RC ignores the
      encoding failure, and goes ahead an
      converts the config values according
      to whatever Tcl thinks the system encoding
      is at the moment.  
      
      Since T_GE() failed, we know this cannot
      be the right thing -- we are definitely converting
      based on the wrong encoding -- and worse, we
      can't even predict what wrong thing T_RC
      will do instead.
      
      When the "valEncoding" cannot be found,
      no data should be copied over to the
      dictionary, since it cannot be done correctly.
      Whether [pkgconfig] should also not be defined,
      or whether it should be defined with no data,
      I'm not sure.
      
    4. icomment:
      Checkins [341f682e08] (8.5) and [6189063c4d] (8.6,trunk)
      have fixed this bug by re-designing it out of existence.
      
      Now these values are stored as bytes, and the encoding
      name is also stored and interpretation of the bytes according
      to that encoding is delayed until the values are retrieved.
      At that time, it's at least likelier that enough initialization
      is complete that encoding conversion will happen successfully.
      If not, the error can arise then rather than during interp creation.
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. severity changed to: "Minor"
  30. Ticket change [3436b56e07] (rid 132651) by dgp on 2013-07-05 16:18:30:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2456479.17951425"
    3. closer changed to: "dgp"
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"