Skip to content

go 1.22.5 cgo exception on windows 7 #68363

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

Closed
luowencai opened this issue Jul 10, 2024 · 3 comments
Closed

go 1.22.5 cgo exception on windows 7 #68363

luowencai opened this issue Jul 10, 2024 · 3 comments

Comments

@luowencai
Copy link

luowencai commented Jul 10, 2024

Go version

since go1.21.5.windows-amd64

Output of go env in your module/workspace:

set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Dell\AppData\Local\go-build
set GOENV=C:\Users\Dell\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Dell\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Dell\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.22.5
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\Dell\AppData\Local\Temp\go-build748694202=/tmp/go-build -gno-record-gcc-switches

What did you do?

We use go 1.22.5 with cgo, gcc use tdm64-gcc-10.3.0-2。

What did you see happen?

It work fine on windows 11/windows 10,But Exception 0xc0000005 on windows 7
image
This Exception happens after 1.21.5,It works fine on 1.21.3
gcc with msys2
image

What did you expect to see?

No Exception on Windows 7 with cgo

@luowencai luowencai changed the title go 1.12.5 cgo exception on windows 7 go 1.22.5 cgo exception on windows 7 Jul 10, 2024
@gophun
Copy link

gophun commented Jul 10, 2024

Windows 7 is no longer supported since Go 1.21: https://go.dev/doc/go1.21#windows

It works fine on 1.21.3

That was pure luck.

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants