Skip to content
Tcl Source Code History Of Ticket baa51423c2
Login

History Of Ticket baa51423c2

Artifacts Associated With Ticket baa51423c2

  1. Ticket change [2e1c732755] (rid 203147) by fvogel on 2022-08-20 07:04:13:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Since [c085b9090c8ae821] (<i>New Windows console driver. Fixes [21280817d1] thread proliferation and [44bbccdd8c] fconfigure std{out,err}.</i>), in a freshly built Tcl from core-8-branch, when running "package require Tk" I get a MSVC Runtime Library debug check triggering: "Run-Time Check Failure #3: The variable 'needEvent' is being used without being initialized."
      
      I believe this comes from a missing initialization in ConsoleCheckProc in tclWinConsole.c:838 but there must be something more about this because when I add this initialization:
      
          int needEvent = 0;
      
      then the console runs (run-time check error is gone) but the continuation lines are broken in the console: it is no longer possible to enter more characters. Example: just enter: "proc a {} {", hit the enter key and it's stuck.
      
    5. foundin initialized to: "core-8-branch"
    6. is_private initialized to: "0"
    7. login: "fvogel"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "a013af67114eccc19ad12b04f14923acea9e96b7"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "fvogel"
    14. subsystem initialized to: "52. Portability Support"
    15. title initialized to:
      tclWinConsole: needEvent variable is used uninitialized
      
    16. type initialized to: "Bug"
  2. Ticket change [52ec2a6684] (rid 203148) by fvogel on 2022-08-20 07:05:02:

    1. assignee changed to: "apnadkarni"
    2. icomment:
      Ashok, may I assign to you since you touched this very recently? Thanks!
      
    3. login: "fvogel"
    4. mimetype: "text/plain"
  3. Ticket change [f3c587148c] (rid 203153) by sebres on 2022-08-20 10:36:36:

    1. icomment:
      Fixed in [fce5cfe1c7e872fe]...
      
      Just I must admit, I saw something that may be potentially dangerous:
      
      ConsoleCheckProc locks two mutexes in a nested way. This is theoretically a candidate for a deadlock in certain circumstances.<br/>
      Ashok, can we be sure there are no constellations where it could happen?<br/>
      I mean TH-A locks gConsoleLock and want to lock handleInfoPtr->lock, in the same time TH-B that still hold the lock on handleInfoPtr->lock attempting to lock gConsoleLock for some reason, what would cause a freezing. We can have one actor more that (especially by read/write locks) make some exclusive (W) lock for some of them, so finally it could lead to hardly reproducible heisenbug.
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [5b62a3191f] (rid 203154) by sebres on 2022-08-20 10:37:00:

    1. closedate changed to: "2459811.94237022"
    2. closer changed to: "sebres"
    3. login: "sebres"
    4. mimetype: "text/plain"
    5. resolution changed to: "Fixed"
    6. status changed to: "Closed"
  5. Ticket change [e29b321fec] (rid 203155) by apnadkarni on 2022-08-20 11:53:52:

    1. closedate changed to: "2459811.99574449"
    2. closer changed to: "apnadkarni"
    3. icomment:
      Found the issue and fixed it. Testing now.
      
      @sebres - just initializing needEvent does not suffice.
      
      @sebres - regarding lock deadlocks, pretty much all my code (here, iocp, isapi) uses lock hierarchies to prevent deadlocks. See comments in the code (search for hierarchy)
      
      /Ashok
      
    4. login: "apnadkarni"
    5. mimetype: "text/plain"
  6. Ticket change [80e47ad075] (rid 203156) by apnadkarni on 2022-08-20 11:55:46:

    1. closedate changed to: "2459811.99706951"
    2. icomment:
      As an aside, I'm a little surprised the compiler did not warn of uninitialized use. I thought they would.
      
    3. login: "apnadkarni"
    4. mimetype: "text/plain"
  7. Ticket change [b7a059fd69] (rid 203159) by fvogel on 2022-08-20 13:17:23:

    1. closedate changed to: "2459812.05373847"
    2. closer changed to: "fvogel"
    3. icomment:
      Comfirm [189e348c49] works for me.
      Thanks!
      
    4. login: "fvogel"
    5. mimetype: "text/x-fossil-wiki"