Go version

go version go1.22.4 darwin/amd64

Output of go env in your module/workspace:

GO111MODULE='auto'
GOARCH='amd64'
GOBIN=''
GOCACHE='/tmp/.gocache'
GOENV='/Users/rittneje/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/rittneje/go/pkg/mod'
GONOPROXY='<redacted>'
GONOSUMDB='<redacted>'
GOOS='darwin'
GOPATH='/Users/rittneje/go'
GOPRIVATE='git.intra.lutron.com'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/rittneje/go1.22.4'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/Users/rittneje/go1.22.4/pkg/tool/darwin_amd64'
GOVCS='<redacted>'
GOVERSION='go1.22.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD=''
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 -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/kf/kr7_s3xx0l12zbj3jrn082hmzy5gvy/T/go-build3773258374=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

//go:debug tlsrsakex=1

package foo

import (
    "runtime/debug"
    "testing"
)

func TestFoo(t *testing.T) {
    t.Fatal(debug.ReadBuildInfo())
}

What did you see happen?

go go1.22.4 true

What did you expect to see?

I expected it to report DefaultGODEBUG tlsrsakex=1.

Not sure if this is entirely a duplicate of #33976. In that case, it was reported that debug.ReadBuildInfo() returned false, which is not the case here.

Comment From: gabyhelp

Similar Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: seankhliao

I believe this is #33976: running the example in the top post gives the new output of just the go version

Comment From: seankhliao

Duplicate of #33876

Comment From: rittneje

@seankhliao did you link the wrong issue? #33876 seems unrelated.

Comment From: seankhliao

yes, sorry, it should have been #33976 While investigating, I did find that it wasn't recorded even for package main, I've filed that for cmd/go as #68053

Comment From: seankhliao

Duplicate of #33976