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

cmd/vet: false positive copylocks check on len(array) and cap(array) #18374

valyala opened this issue Dec 19, 2016 · 2 comments


None yet
3 participants
Copy link

commented Dec 19, 2016

The commit bd9aa98 introduced false positive for copylocks check in `go tool vet':

var a [5]sync.Mutex

// vet incorrectly emits 'function call copies lock value: sync.Mutex' on the following lines:
n := len(a)
m := cap(a)

The commit bd9aa98 was introduced in go1.8, so this false positive should be fixed in go1.8 too.

I'll send the corresponding CL fixing this issue in a few minutes.


This comment has been minimized.

Copy link
Contributor Author

commented Dec 19, 2016


This comment has been minimized.

Copy link

commented Dec 19, 2016

CL mentions this issue.

@rakyll rakyll added this to the Go1.8 milestone Dec 19, 2016

@gopherbot gopherbot closed this in d160982 Dec 24, 2016

@golang golang locked and limited conversation to collaborators Dec 24, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.