Skip to content
Tcl Source Code History Of Ticket f8a33ce3db5d8cc2
Login

History Of Ticket f8a33ce3db5d8cc2

Artifacts Associated With Ticket f8a33ce3db5d8cc2

  1. Ticket change [8233aa6117] (rid 172631) by sebres on 2019-06-21 19:10:20:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Initially reported in [https://groups.google.com/forum/#!topic/comp.lang.tcl/NU-J41Z07F4|groups.google.com...comp.lang.tcl/NU-J41Z07F4].
      
      The issue:<p style="padding-left:10pt">
      Calling of Tcl_Exit from main before Tcl being initialized causes a segfault.<br/><br/>
      The segfault occurs currently due to missing properly initialized Tcl-subsystems, at several places (no encoding by converting from external in get env-variable TCL_FINALIZE_ON_EXIT, no master TSD calling TCL_TSD_INIT, etc).
      </p>
      
      The solution for "unfixed" version:
      <code><pre style="padding-left:10pt">
        int main( int argc, char* argv[] ) {
          ...
      <b style="color:green">+   Tcl_FindExecutable(argv[0]);</b>
          ...
          Tcl_Exit(1); 
          ... 
        }
      </pre></code>
      
      Although I'm not sure, that this can be considered as a bug, I'll fix it, because the call of Tcl_FindExecutable is not really expected for proper exit, the program may use some common code where it then should destinguish between exit/Tcl_Exit (as well as to know, the Tcl got initialized or not), Tcl exit proc could be set (via Tcl_SetExitProc), etc.<br/>
      And because the fix looks pretty easy (I found an easy-fix for that).
      
    5. foundin initialized to: ">= 8.6"
    6. is_private initialized to: "0"
    7. login: "sebres"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Severe"
    11. status initialized to: "Open"
    12. submitter initialized to: "sebres"
    13. subsystem initialized to: "69. Other"
    14. title initialized to:
      Tcl_Exit segfaults in application without initialized tcl-subsystems
      
    15. type initialized to: "Bug"
  2. Ticket change [a61946f185] (rid 172634) by sebres on 2019-06-21 19:26:03:

    1. closedate changed to: "2458656.30976222"
    2. closer changed to: "sebres"
    3. icomment: "Fixed in [6c48a3be6d], this closed."
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"