Closed
Description
Go version
go1.24rc2 linux/amd64
Output of go env
in your module/workspace:
AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='0'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GO386='sse2'
GOARCH='386'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/bryan/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/bryan/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m32 -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1397494606=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/tmp/jsoniter/go.mod'
GOMODCACHE='/home/bryan/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/bryan'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/bryan/pkg/mod/golang.org/[email protected]'
GOSUMDB='sum.golang.org'
GOTELEMETRY='on'
GOTELEMETRYDIR='/home/bryan/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/bryan/pkg/mod/golang.org/[email protected]/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.24rc2'
GOWORK=''
PKG_CONFIG='pkg-config'
What did you do?
When GOARCH was set to 386, and trying out the release candidates of Go 1.24, a unit test failed in the project Prometheus: https://github.com/prometheus/prometheus/actions/runs/12932314085/job/36070245239?pr=15707
I have simplified to just one use of the 'jsoniter' library.
https://go.dev/play/p/gtfdrAhV48r?v=gotip
(That link gets a different error: could not parse netrc (GOAUTH=netrc): $HOME is not defined
, so I'll supply files too.)
go.mod
go.sum
jsoniter_test.go
What did you see happen?
$ GOARCH=386 go test
--- FAIL: TestJsonIter (0.00s)
jsoniter_test.go:21: Result too short (28): "{\"item1\":[{\"type\":\"gauge\"}]}"
FAIL
exit status 1
FAIL v1 0.001s
What did you expect to see?
The resulting JSON should be about 57 bytes long, with two items in it.
The test passes with GOARCH=amd64 and Go 1.24rc2, also with GOARCH=386 on Go 1.23.