-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/cgo, runtime: panic error when using 'fmt' and dll #21138
Comments
@czxichen for easier reproducibility and bug fixing, perhaps it might be helpful to post a link or a way of getting files Psapi.h and Psapi.dll. Since this is a potential cmd/cgo and runtime issue, I'll page @ianlancetaylor and @aclements. |
@czxichen unfortunately that returns a 404 |
@odeke-em I sent it to you by email(emm.odeke@gmail.com) attachment. |
The code looks a bit weird in that in the loop in func Query, it doubles bufferSize but doesn't allocate a larger buffer. This may cause memory corruption if |
@cherrymui thanks,This mistake is too low. |
You have to be double careful when you use "unsafe" package. Alex |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.9beta1 windows/amd64
What operating system and processor architecture are you using (
go env
)?set GOARCH=amd64
set GOBIN=D:\GO\BIN
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\code
set GORACE=
set GOROOT=D:\go
set GOTOOLDIR=D:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\administrator\AppData\Local\Temp\go-build914327971=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
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
What did you do?
View the Windows process private memory
What did you expect to see?
Is it my code problem? Or something else?
What did you see instead?
The text was updated successfully, but these errors were encountered: