Skip to content

cmd/cgo/internal/testsanitizers: TestLibFuzzer and TestMSAN fail with CC=clang CGO_ENABLED=0 #64626

@ttttcrngyblflpp

Description

@ttttcrngyblflpp

Go version

go version go1.21.4 linux/amd64

What operating system and processor architecture are you using (go env)?

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/usr/local/google/home/gongt/.cache/go-build'
GOENV='/usr/local/google/home/gongt/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/usr/local/google/home/gongt/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/usr/local/google/home/gongt/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/google/home/gongt/goc'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/google/home/gongt/goc/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/usr/local/google/home/gongt/goc/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 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2742143614=/tmp/go-build -gno-record-gcc-switches'

What did you do?

On a clean checkout of go1.21.4, run:

cd src
CC=clang CGO_ENABLED=0 ./make.bash
./run.bash

My clang version is 14.0.6.

What did you expect to see?

All tests pass.

What did you see instead?

--- FAIL: TestLibFuzzer (0.33s)
    --- FAIL: TestLibFuzzer/libfuzzer1 (0.01s)
        libfuzzer_test.go:49: /usr/local/google/home/gongt/goc/bin/go build -tags=libfuzzer -gcflags=-d=libfuzzer -buildmode=c-archive -o /tmp/TestLibFuzzer3296197254/libfuzzer1.a testdata/libfuzzer1.go exited with exit status 1
            go: no Go source files
    --- FAIL: TestLibFuzzer/libfuzzer2 (0.01s)
        libfuzzer_test.go:49: /usr/local/google/home/gongt/goc/bin/go build -tags=libfuzzer -gcflags=-d=libfuzzer -buildmode=c-archive -o /tmp/TestLibFuzzer850547297/libfuzzer2.a testdata/libfuzzer2.go exited with exit status 1
            go: no Go source files
--- FAIL: TestMSAN (0.27s)
    msan_test.go:38: /usr/local/google/home/gongt/goc/bin/go build -msan std exited with exit status 2
        go: -msan requires cgo; enable cgo by setting CGO_ENABLED=1
FAIL
FAIL	cmd/cgo/internal/testsanitizers	0.648s

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe 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