Skip to content
Tcl Source Code History Of Ticket d402ffe76
Login

History Of Ticket d402ffe76

Artifacts Associated With Ticket d402ffe76

  1. Ticket change [e2eaec4a73] (rid 183229) by chw on 2020-05-10 20:13:51:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      According to MSDN the _wenviron variable initially is NULL when
      the program starts via main() but is populated on the very first
      call of _wgetenv() or _wputenv().
      
      The current core-8-6-branch requires in TclSetupEnv() _wenviron
      to be non NULL, otherwise a crash (access violation, segfault)
      happens. When some custom code embeds Tcl as a library and uses
      main() instead of wmain() as its program entry point, that crash
      is most likely.
      
      Please see https://www.androwish.org/home/info/93ee54fe8cd2e176
      for a possible solution.
      
    5. foundin initialized to: "core-8-6-branch"
    6. is_private initialized to: "0"
    7. login: "chw"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0b3aff16612e1e9f3b675963fa64e01bd1d89307"
    10. resolution initialized to: "None"
    11. severity initialized to: "Critical"
    12. status initialized to: "Open"
    13. submitter initialized to: "chw"
    14. subsystem initialized to: "50. Embedding Support"
    15. title initialized to: "Win32 potential crash when using main()"
    16. type initialized to: "Bug"
  2. Ticket change [a024f310b9] (rid 183239) by jan.nijtmans on 2020-05-10 20:58:59:

    1. assignee changed to: "jan.nijtmans"
    2. icomment: "Thanks! I will have a look at this."
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
  3. Ticket change [135b0ca767] (rid 183303) by jan.nijtmans on 2020-05-12 11:29:13:

    1. closedate changed to: "2458981.97863103"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Merged to core-8-6-branch and up. Thanks for the report and the fix!
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  4. Ticket change [11c618ba05] (rid 261382) by anonymous on 2026-11-10 18:10:43:

    1. closedate changed to: "2461355.2574499655"
    2. closer changed to: "anonymous"
    3. icomment:
      This issue still exists in 9.0 due to TclFinalizeIOSubsystem() calling TclGetEnv() around line 598 of tclIO.c.
      
      It's possible for trivial apps to initialise and finalise and hit this path. I encountered this creating a minimal repro for a build issue with CPython. 
      
      The fix I'd suggest is to have TclpFindVariable (in tclWinInit.c) check for a NULL _wenviron and do an arbitrary _wgetenv to initialise before continuing. I assume there's some reason for doing your own search rather than using _wgetenv (or _wgetenv_s), but if not, switching to that for the search ought to be fine too.
      
    4. login: "anonymous"
    5. mimetype: "text/plain"
    6. username: "[email protected]"
  5. Ticket change [e3a1b985c9] (rid 261383) by oehhar on 2026-11-10 19:27:25:

    1. closer changed to: "nobody"
    2. login: "oehhar"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
  6. Ticket change [23a9e91ee1] (rid 261387) by jan.nijtmans on 2026-11-10 20:02:21:

    1. icomment: "Something like [6019bf7e078|this]?"
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  7. Ticket change [7a12b7ef81] (rid 261418) by jan.nijtmans on 2026-11-11 13:56:12:

    1. closedate changed to: "2461356.0807035416"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      No merged to [6019bf7e078|trunk], core-9-0-branch and core-8-6-branch
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. status changed to: "Closed"
  8. Ticket change [cd4075d4e3] (rid 261419) by jan.nijtmans on 2026-11-11 14:10:58:

    1. closedate changed to: "2461356.0909512038"
    2. icomment:
      Now merged to [trunk], core-9-0-branch and core-8-6-branch
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"