Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/sys: windows.WTD_STATEACTION_VERIFY has incorrect value #46906

Closed
konangc87 opened this issue Jun 24, 2021 · 10 comments
Closed

x/sys: windows.WTD_STATEACTION_VERIFY has incorrect value #46906

konangc87 opened this issue Jun 24, 2021 · 10 comments
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. OS-Windows
Milestone

Comments

@konangc87
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.16.5 windows/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\fedegc\AppData\Local\go-build
set GOENV=C:\Users\fedegc\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\fedegc\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\fedegc\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.16.5
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\fedegc\AppData\Local\Temp\go-build2839842620=/tmp/go-build -gno-record-gcc-switches

What did you do?

What did you expect to see?

windows.WTD_STATEACTION_VERIFY value is 0x00000001 (according to msdn)

What did you see instead?

windows.WTD_STATEACTION_VERIFY value is 0x00000010 (types_windows.go)

@toothrot toothrot changed the title windows.WTD_STATEACTION_VERIFY wrong value x/sys: windows.WTD_STATEACTION_VERIFY wrong value Jun 24, 2021
@gopherbot gopherbot added this to the Unreleased milestone Jun 24, 2021
@toothrot toothrot changed the title x/sys: windows.WTD_STATEACTION_VERIFY wrong value x/sys: windows.WTD_STATEACTION_VERIFY has incorrect value Jun 24, 2021
@toothrot
Copy link
Contributor

@bufflig - this seems possibly a typo?

@toothrot toothrot added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jun 24, 2021
@networkimprov
Copy link

cc @alexbrainman @mattn

@alexbrainman
Copy link
Member

this seems possibly a typo?

I agree. It is a mistake in

https://go-review.googlesource.com/c/sys/+/285715

@konangc87 would you like to send a fix for your issue yourself? Here is

https://golang.org/doc/contribute

how to contribute.

/cc @zx2c4 because he authored the CL 285715.

Alex

@zx2c4
Copy link
Contributor

zx2c4 commented Jun 27, 2021

Nice catch! Looks like a typo indeed? Or mingw headers are wrong? I'll have to check how this happened. I wonder, though, what the behavior of 0x10 is, as I've been using the bad code in question for some time.

I can send a CL for this if you don't want to.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/331010 mentions this issue: windows: fix constant value of WTD_STATEACTION_VERIFY

@konangc87
Copy link
Author

this seems possibly a typo?

I agree. It is a mistake in

https://go-review.googlesource.com/c/sys/+/285715

@konangc87 would you like to send a fix for your issue yourself? Here is

https://golang.org/doc/contribute

how to contribute.

/cc @zx2c4 because he authored the CL 285715.

Alex

No problem. I'll submit the fix =)

@zx2c4
Copy link
Contributor

zx2c4 commented Jun 28, 2021

https://golang.org/cl/331010 covers it already.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/364794 mentions this issue: windows: skip TestWinVerifyTrust

gopherbot pushed a commit to golang/sys that referenced this issue Nov 17, 2021
This test is failing (with different failure modes) on two different
builders. Adding a skip until it can be made more robust.

For golang/go#49651
For golang/go#49266
Updates golang/go#46906

Change-Id: I0fdd0e6f729c37e234b62b65abc53003eb8834f0
Reviewed-on: https://go-review.googlesource.com/c/sys/+/364794
Trust: Bryan C. Mills <bcmills@google.com>
Trust: Patrik Nyblom <pnyb@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Patrik Nyblom <pnyb@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/366655 mentions this issue: windows: re-eenable TestWinVerifyTrust with newly signed file

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/366655 mentions this issue: windows: re-enable TestWinVerifyTrust with newly signed file

gopherbot pushed a commit to golang/sys that referenced this issue Nov 23, 2021
Rather than disabling this test, let's just not make it rely on
Microsoft files, whose signing validity period we can't depend on.
Instead, we include our own EV-signed artifact, with a Digicert
timestamp using a certificate valid for a decade.

Fixes golang/go#49651.
Fixes golang/go#49266.
For golang/go#46906.

Change-Id: Idadba346810017b8f769d6fac1ddd357d4dee93c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/366655
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. OS-Windows
Projects
None yet
Development

No branches or pull requests

6 participants