What version of Go are you using (go version)?
$ go version
go version go1.20 linux/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
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mandark/.cache/go-build"
GOENV="/home/mandark/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/mandark/go/pkg/mod"
GONOPROXY="gitlab.com"
GONOSUMDB="gitlab.com"
GOOS="linux"
GOPATH="/home/mandark/go"
GOPRIVATE="gitlab.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/mandark/sdk/go1.20"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/mandark/sdk/go1.20/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/mandark/go/src/gitlab.com/shaadi/profile-api/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3971895452=/tmp/go-build -gno-record-gcc-switches"
What did you do?
Tried to debug the golang code by creating a binary using
go build -gcflags="all=-N -l" -o test .
What did you expect to see?
Creation of debug binary
What did you see instead?
# gitlab.com/xyz/repo/pkg/profile
../../pkg/profile/state_mapping.go:8:5: internal compiler error: NewBulk too big: nbit=20196 count=986153 nword=632 size=623248696
Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
Checked the file, originally it contained static mapping, but after removing all the mappings and making it empty it is showing the same error.
Modified file contents:
package profile
type CountryData struct {
Country string
CountryCode string
}
var StateMapping = map[string][]CountryData{}
Still giving internal compiler error: NewBulk too big error message when tried to debug the build.
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 envOutputWhat did you do?
Tried to debug the golang code by creating a binary using
What did you expect to see?
Creation of debug binary
What did you see instead?
Checked the file, originally it contained static mapping, but after removing all the mappings and making it empty it is showing the same error.
Modified file contents:
package profile type CountryData struct { Country string CountryCode string } var StateMapping = map[string][]CountryData{}Still giving internal compiler error: NewBulk too big error message when tried to debug the build.