-
Notifications
You must be signed in to change notification settings - Fork 18k
x/sys/windows/mkwinsyscall: generates invalid calls for GOARCH=386 #42373
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
Comments
I have a fix in my fork which I will submit for review: |
Change https://golang.org/cl/267617 mentions this issue: |
Which Windows API do you have trouble with? Alex |
That would be https://docs.microsoft.com/en-us/windows/win32/api/winevt/nf-winevt-evtseek |
Currently it appears that in syscall package, calls with 64-bit arguments are handled on individual basis. go/src/syscall/syscall_windows.go Lines 414 to 436 in 333e904
|
What version of Go are you using (
go version
)?go version go1.15.3 windows/386
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?set GO111MODULE=
set GOARCH=386
set GOBIN=
set GOCACHE=C:\Users\vagrant\AppData\Local\go-build
set GOENV=C:\Users\vagrant\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\vagrant\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\vagrant\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\go\pkg\tool\windows_386
set GCCGO=gccgo
set GO386=sse2
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\vagrant\go.mod
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=-m32 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\vagrant\AppData\Local\Temp\go-build184742666=/tmp/go-build -gno-record-gcc-switches
What did you do?
What did you expect to see?
For arches where an uintptr is 32-bit, the first parameter should take two arguments in Syscall:
What did you see instead?
This call won't be valid when GOARCH=386 as
param1
(64bit) is being cast to an uintptr (32bit). The receiver would be expecting 64-bits on the stack for the first argument.The text was updated successfully, but these errors were encountered: