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
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 GOARCH=386
set GOBIN=
set GOCACHE=C:\Users\1\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\Golib
set GOPROXY=
set GORACE=
set GOROOT=D:\Go
set GOTMPDIR=
set GOTOOLDIR=D:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set GO386=sse2
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=E:\workspace\998-source\gowork\src\github.com\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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=T:\Temp\go-build953563306=/tmp/go-build -gno-record-gcc-switches
The text was updated successfully, but these errors were encountered:
tklauser
changed the title
call 32bit dll in 64bit windows panic when pass float64(double) parameter
x/sys/windows: call 32bit dll in 64bit windows panic when pass float64(double) parameter
Dec 4, 2018
But C f64 takes 8 bytes, while Go parameter is uintptr (4 bytes). This is not allowed. I think you want to split Go f64 into 2 uintptr values (upper and lower 4 bytes), and pass them to dllFunc.Call as separate parameters.
I did not look passed C f64, but similar logic would apply.
I do not have Visual C to build your DLL, and you did not provide the DLL source, so I cannot verify my theory. But I don't think there is anything to fix here - this is all working as expected. Let me know, if I am wrong.
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?
https://play.golang.org/p/roPsAJFuQpU
What did you expect to see?
f32: 3f800000, f64: 3ff0000000000000
out = 1
What did you see instead?
In Windows DebugView: [20868] f32 3f800000, f64:1105008000000000
Output
The text was updated successfully, but these errors were encountered: