Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Tcl_PutEnv() crashes on Windows

Closed / Fixed592a25a505a942c57ea6462057c8a70807d798abCreated 5 years agoUpdated 5 years ago
Descriptionhtml2021-07-15 15:57:36

A simple Tcl_PutEnv() call causes a segmentation fault on Windows, when no interpreters have been created yet at that point. Example:

    Tcl_FindExecutable(argv[0]);
    Tcl_PutEnv("TCL_LIBRARY=/some/path");
    Tcl_Interp* ip = Tcl_CreateInterp();
The crash was first observed with this code to set TCL_LIBRARY before creating an interpreter, but actually it occurs with any environment variable.

Referenced by2
jan.nijtmanswiki2021-07-16 15:54:12

Does [this] fix it?

danckaerthtml2021-07-16 17:25:24

Yes, that fixes it. Thanks!

jan.nijtmanswiki2021-07-17 11:22:29

Fixed in all branches now. Thanks for the report!

jan.nijtmans Closed ticket [592a25a505]. [History diff]2021-07-17 11:22:39
Log in (anonymous is fine) to add a comment.