Open petemoore opened 5 years ago
This isn't actually a documentation bug (I see this issue just received the Documentation label) but a potential golang standard library bug for Windows platform.
Evil machine overlords etc etc…
This SGTM.
I don't see the downside of this change. But others might disagree.
Alex
Change https://golang.org/cl/160828 mentions this issue: syscall: perform environment variable sort for createEnvBlock
If this isn't causing any known problems, I think we should wait until Go 1.14 (and early-in-cycle).
SGTM!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I looked at https://github.com/golang/go/blob/go1.11.4/src/syscall/exec_windows.go#L97-L122
What did you expect to see?
I expected to see the env vars sorted alphabetically by name, with case-insensitive sort, Unicode order, without regard to locale.
What did you see instead?
The code does not sort the environment variable entries. The MSDN docs state:
Note, this hasn't caused me any problems - but it seems like this could cause problems with any Windows kernel functions that expect the env to be sorted.