Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.fuzz] cmd/go: 'go clean -fuzzcache' should not delete compiled files #47478

Closed
jayconrod opened this issue Jul 30, 2021 · 1 comment
Closed
Labels
FrozenDueToAge fuzz Issues related to native fuzzing support NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@jayconrod
Copy link
Contributor

What version of Go are you using (go version)?

Development build based on 2a0825d

Does this issue reproduce with the latest release?

n/a

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jay/.cache/go-build"
GOENV="/home/jay/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/jay/.cache/gomodcache"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/jay/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/jay/Code/gofuzz"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/jay/Code/gofuzz/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel go1.17-6dc2bdc51e Tue Jul 27 17:08:39 2021 -0700"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/jay/Code/test/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2424074397=/tmp/go-build -gno-record-gcc-switches"

What did you do?

# Compile a test binary with fuzzing instrumentation
go test -c -fuzz=.
go clean -fuzzcache
[ -f test.test ] || echo "test.test was deleted!"

What did you expect to see?

test.test left alone.

What did you see instead?

test.test was deleted.

@jayconrod jayconrod added NeedsFix The path to resolution is known, but the work has not been done. fuzz Issues related to native fuzzing support labels Jul 30, 2021
@jayconrod jayconrod added this to the Unreleased milestone Jul 30, 2021
@gopherbot
Copy link

Change https://golang.org/cl/338752 mentions this issue: [dev.fuzz] cmd/go: 'go clean -fuzzcache' should not delete compiled files

gopherbot pushed a commit that referenced this issue Aug 3, 2021
…iles

This change adds -fuzzcache to the list of flags that prevents 'go clean'
from cleaning packages by default.

Fixes #47478

Change-Id: I07c9c24ff6359e45e9661b307a671274ab2d7212
GitHub-Last-Rev: 4929618
GitHub-Pull-Request: #47483
Reviewed-on: https://go-review.googlesource.com/c/go/+/338752
Reviewed-by: Jay Conrod <jayconrod@google.com>
Trust: Jay Conrod <jayconrod@google.com>
Trust: Roland Shoemaker <roland@golang.org>
Trust: Bryan C. Mills <bcmills@google.com>
@golang golang locked and limited conversation to collaborators Aug 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge fuzz Issues related to native fuzzing support NeedsFix The path to resolution is known, but the work has not been done.
Projects
Status: No status
Development

No branches or pull requests

2 participants