Artifacts Associated With Ticket f3ee78aedbda6d61
Ticket change [e05145214f] (rid 137514) by kevin.bowen on 2014-04-04 19:51:46:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
One of our engineers encountered this issue a while ago on version 8.4.6 and worked around it with the following patch. We are submitting the fix back to the user community. The patch has been updated to reference version 8.6.1. ----- Patch ----- atlgar-vdi0952[kbowen](~/workspace_remote/tcl8.6.1/generic)$ diff -du tclEnv.c.orig tclEnv.c --- tclEnv.c.orig 2013-09-19 15:04:14.000000000 -0400 +++ tclEnv.c 2014-04-04 15:35:00.851155000 -0400 @@ -565,6 +565,7 @@ const char *value = TclGetEnv(name2, &valueString); if (value == NULL) { + Tcl_UnsetVar2(interp, name1, name2, 0); return (char *) "no such variable"; } Tcl_SetVar2(interp, name1, name2, value, 0); ----- Reproduction Script ----- #! /bin/env tclsh set testEnvName USER set slave [interp create] puts "TCL Version = $tcl_version" puts "Defined to start - $testEnvName = $env($testEnvName)" # Execute a slave interp to unsetenv the variable $slave eval unset env($testEnvName) if { [info exists env($testEnvName)] == 1 } { # This will execute even when the environment variable has been unset. # This causes a de-reference error. puts "Still defined? - $testEnvName = $env($testEnvName)" } else { puts "Not defined - $testEnvName" } ----- Reproduction Output ----- atlgar-vdi0952[kbowen](~/workspace_remote)$ ./tcl_problem TCL Version = 8.4 Defined to start - USER = kbowen can't read "env(USER)": no such variable while executing "puts "Still defined? - $testEnvName = $env($testEnvName)"" invoked from within "if { [info exists env($testEnvName)] == 1 } { # This will execute even when the environment variable has been unset. # This causes a de-refere..." (file "../../tcl_problem" line 13) - foundin initialized to: "8.6.1"
- is_private initialized to: "0"
- login: "kevin.bowen"
- priority initialized to: "5 Medium"
- private_contact initialized to: "00ad10b7c04c674401b80f9628892d9486e49d6e"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "kevin.bowen"
- subsystem initialized to: "08. Environment Variables"
- title initialized to:
Env variables unset in slave appear to be defined but are not accessible by master
- type initialized to: "Bug"
Ticket change [7f8f913bc2] (rid 137531) by dgp on 2014-04-07 17:25:27:
- icomment:
Have you tried your demo script on Tcl 8.6 ? When I do, it no longer demonstrates the problem. Can you clarify please?
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [3650cfd132] (rid 137532) by kevin.bowen on 2014-04-07 17:59:37:
- icomment:
Our IT staff happens to have 8.6.0 installed. Just tried it. atlgar-vdi0952[kbowen](~/workspace_remote)$ /tools/pandora64/.package/tcltk-8.6.0/bin/tclsh8.6 ./tcl_problem TCL Version = 8.6 Defined to start - USER = kbowen no such variable (read trace on "env(USER)") invoked from within "puts "Still defined? - $testEnvName = $env($testEnvName)"" invoked from within "if { [info exists env($testEnvName)] == 1 } { # This will execute even when the environment variable has been unset. # This causes a de-refere..." (file "./tcl_problem" line 13) - login: "kevin.bowen"
- mimetype: "text/plain"
- icomment:
Ticket change [2e8a87ac91] (rid 137533) by dgp on 2014-04-07 18:57:54:
- assignee changed to: "jan.nijtmans"
- icomment:
OK, I bisected and found that since checkout: bac3f9b1394f8eebc83f67a57948a6f4d68dcaf0 2013-11-20 11:20:32 UTC the problem has been resolved on the development trunk, so Tcl 8.6.2 should be ok. Assigning to jan.nijtmans in case there's any more to say.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Out of Date"
Ticket change [cf12bd1bc8] (rid 137535) by jan.nijtmans on 2014-04-08 14:39:31:
- closedate changed to: "2456756.11078648"
- closer changed to: "jan.nijtmans"
- icomment:
The hard work fixing tracing the "env" array was done earlier by dkf in [afaff33553]. This broke the win32 test-suite, apparently because dkf's work exposed the bug described in this ticket. That's what I fixed in [bac3f9b139] So, if everything is fixed, I have nothing more to say! Closing.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- status changed to: "Closed"