diff options
| author | qmuntal <quimmuntal@gmail.com> | 2024-02-28 16:06:04 +0100 |
|---|---|---|
| committer | Quim Muntal <quimmuntal@gmail.com> | 2024-03-04 18:59:50 +0000 |
| commit | 7986e26a39e9df870886a9933107372f4e16ea4c (patch) | |
| tree | dcda4d454d0487d63d6a4902042aaf71751fd9ba /src/runtime/metrics/doc.go | |
| parent | 90796f44d5d10163196c6116ae667eddba8b06c0 (diff) | |
| download | go-7986e26a39e9df870886a9933107372f4e16ea4c.tar.xz | |
os: don't treat mount points as symbolic links
This CL changes the behavior of os.Lstat to stop setting the
os.ModeSymlink type mode bit for mount points on Windows. As a result,
filepath.EvalSymlinks no longer evaluates mount points, which was the
cause of many inconsistencies and bugs.
Additionally, os.Lstat starts setting the os.ModeIrregular type mode bit
for all reparse tags on Windows, except for those that are explicitly
supported by the os package, which, since this CL, doesn't include mount
points. This helps to identify files that need special handling outside
of the os package.
This behavior is controlled by the `winsymlink` GODEBUG setting.
For Go 1.23, it defaults to `winsymlink=1`.
Previous versions default to `winsymlink=0`.
Fixes #39786
Fixes #40176
Fixes #61893
Updates #63703
Updates #40180
Updates #63429
Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-windows-arm64
Change-Id: I2e7372ab8862f5062667d30db6958d972bce5407
Reviewed-on: https://go-review.googlesource.com/c/go/+/565136
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/metrics/doc.go')
| -rw-r--r-- | src/runtime/metrics/doc.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/metrics/doc.go b/src/runtime/metrics/doc.go index fb2f44da29..2a1a3055fa 100644 --- a/src/runtime/metrics/doc.go +++ b/src/runtime/metrics/doc.go @@ -319,6 +319,10 @@ Below is the full list of supported metrics, ordered lexicographically. The number of non-default behaviors executed by the crypto/tls package due to a non-default GODEBUG=tlsunsafeekm=... setting. + /godebug/non-default-behavior/winsymlink:events + The number of non-default behaviors executed by the os package + due to a non-default GODEBUG=winsymlink=... setting. + /godebug/non-default-behavior/x509sha1:events The number of non-default behaviors executed by the crypto/x509 package due to a non-default GODEBUG=x509sha1=... setting. |
