You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows environment variable names are case-insensitive, this function didn't take this into consideration. Therefore it could pass the same environment variable with different cases to the Windows API. For example, {"FOO": "bar1", "foo" : "bar2", "Foo": "bar3"}. Surprisingly, Windows will allow it!
A simple reproduce with Bazel 0.13.0: https://github.com/meteorcloudy/my_tests/blob/master/simple_repo_rule/repo.bzl#L3
Bazel builds environment variables map for creating Windows process by the following function:
bazel/src/main/java/com/google/devtools/build/lib/windows/WindowsSubprocessFactory.java
Line 120 in 8044286
Windows environment variable names are case-insensitive, this function didn't take this into consideration. Therefore it could pass the same environment variable with different cases to the Windows API. For example,
{"FOO": "bar1", "foo" : "bar2", "Foo": "bar3"}
. Surprisingly, Windows will allow it!A simple reproduce with Bazel 0.13.0:
https://github.com/meteorcloudy/my_tests/blob/master/simple_repo_rule/repo.bzl#L3
This causes problems when we will try to set or clean environment variables before executing an action. For example,
bazel/tools/cpp/windows_cc_configure.bzl
Lines 194 to 195 in 768f181
If in user's environment, envs like
Path
orWindowsSdkDir
are already set, this won't be able to clean the expected envs.The text was updated successfully, but these errors were encountered: