Skip to content

cmd/compile: cannot build runtime in coverage mode on Wasm #70510

Open
@Zxilly

Description

@Zxilly

Go version

go version go1.23.3 linux/s390x

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='s390x'
GOBIN=''
GOCACHE='/home/linux1/.cache/go-build'
GOENV='/home/linux1/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='s390x'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/linux1/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/linux1/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/snap/go/10737'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/snap/go/10737/pkg/tool/linux_s390x'
GOVCS=''
GOVERSION='go1.23.3'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/linux1/.config/go/telemetry'
GCCGO='gccgo'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
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 -march=z196 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3325072388=/tmp/go-build -gno-record-gcc-switches'

What did you do?

Run following command

git clone https://github.com/Zxilly/go-size-analyzer.git
GOOS=js GOARCH=wasm go test -v -covermode=atomic -cover -coverpkg=../../...

Then build failed.

What did you see happen?

# runtime
../../_tool/go/1.23.2/s390x/src/runtime/panic.go:652:10: write barrier prohibited by caller; preprintpanics
	../../_tool/go/1.23.2/s390x/src/runtime/panic.go:802:77: called by gopanic
	../../_tool/go/1.23.2/s390x/src/runtime/panic.go:171:7: called by goPanicSlice3AlenU
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:253:71: called by (*bucket).stk
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:309:68: called by stkbucket
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:854:16: called by saveBlockEventStack
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:840:21: called by (*mLockProfile).store
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:773:13: called by (*mLockProfile).recordUnlock
../../_tool/go/1.23.2/s390x/src/runtime/panic.go:819:12: write barrier prohibited by caller; (*_panic).start
	../../_tool/go/1.23.2/s390x/src/runtime/panic.go:779:9: called by gopanic
	../../_tool/go/1.23.2/s390x/src/runtime/panic.go:171:7: called by goPanicSlice3AlenU
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:253:71: called by (*bucket).stk
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:309:68: called by stkbucket
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:854:16: called by saveBlockEventStack
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:840:21: called by (*mLockProfile).store
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:773:13: called by (*mLockProfile).recordUnlock
../../_tool/go/1.23.2/s390x/src/runtime/panic.go:872:69: write barrier prohibited by caller; (*_panic).nextDefer
	../../_tool/go/1.23.2/s390x/src/runtime/panic.go:781:24: called by gopanic
	../../_tool/go/1.23.2/s390x/src/runtime/panic.go:171:7: called by goPanicSlice3AlenU
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:253:71: called by (*bucket).stk
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:309:68: called by stkbucket
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:854:16: called by saveBlockEventStack
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:840:21: called by (*mLockProfile).store
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:773:13: called by (*mLockProfile).recordUnlock
../../_tool/go/1.23.2/s390x/src/runtime/malloc.go:1187:19: write barrier prohibited by caller; mallocgc
	../../_tool/go/1.23.2/s390x/src/runtime/iface.go:360:74: called by convTnoptr
	../../_tool/go/1.23.2/s390x/src/runtime/panic.go:171:19: called by goPanicSlice3AlenU
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:253:71: called by (*bucket).stk
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:309:68: called by stkbucket
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:854:16: called by saveBlockEventStack
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:840:21: called by (*mLockProfile).store
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:773:13: called by (*mLockProfile).recordUnlock
../../_tool/go/1.23.2/s390x/src/runtime/runtime.go:172:8: write barrier prohibited by caller; (*godebugInc).IncNonDefault
	../../_tool/go/1.23.2/s390x/src/runtime/panic.go:740:26: called by gopanic
	../../_tool/go/1.23.2/s390x/src/runtime/panic.go:171:7: called by goPanicSlice3AlenU
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:253:71: called by (*bucket).stk
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:309:68: called by stkbucket
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:854:16: called by saveBlockEventStack
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:840:21: called by (*mLockProfile).store
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:773:13: called by (*mLockProfile).recordUnlock
../../_tool/go/1.23.2/s390x/src/runtime/trace.go:493:17: write barrier prohibited by caller; traceAdvance
	../../_tool/go/1.23.2/s390x/src/runtime/panic.go:795:15: called by gopanic
	../../_tool/go/1.23.2/s390x/src/runtime/panic.go:171:7: called by goPanicSlice3AlenU
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:253:71: called by (*bucket).stk
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:309:68: called by stkbucket
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:854:16: called by saveBlockEventStack
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:840:21: called by (*mLockProfile).store
	../../_tool/go/1.23.2/s390x/src/runtime/mprof.go:773:13: called by (*mLockProfile).recordUnlock
FAIL	github.com/Zxilly/go-size-analyzer [build failed]

What did you expect to see?

Works correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.arch-wasmWebAssembly issuescompiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions