Skip to content

cmd/compile: internal compiler crash when enabling libfuzzer instrumentation #69825

Closed
@randall77

Description

@randall77

Go version

tip

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/khr/Library/Caches/go-build'
GOENV='/Users/khr/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/khr/gopath/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/khr/gopath'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/khr/sandbox/ro5'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/khr/sandbox/ro5/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='devel go1.24-943abbfd74 Wed Sep 25 08:36:07 2024 -0700'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/khr/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/khr/sandbox/ro5/src/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 -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/z9/dty110711l9cr9w3ktv1_2380000gn/T/go-build1149802709=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

package main

type T struct {
	A
}

type A struct {
}

//go:noinline
func (a *A) Foo(s [2]string) {
}

Build with

go tool compile -d=libfuzzer=1 test.go

What did you see happen?

This crashes the tip compiler with an error like

<autogenerated>:1: internal compiler error: '(*T).Foo': func (*T).Foo, startMem[b1] has different values, old v1, new v22

What did you expect to see?

no crash

Metadata

Metadata

Assignees

Labels

NeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions