You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added yet another patch for detecting locks' copying inside composite literals:
typeAstruct {
L sync.Mutex
}
varm sync.Mutexa:=A{
L: m, // now this case is detected
}
b:= []sync.Mutex{m, a.L} // and this onec:=map[string]sync.Mutex{"foo": m} // and this one
Activity
valyala commentedon Mar 6, 2016
Submitted a patch for code review - https://go-review.googlesource.com/20254 .
gopherbot commentedon Mar 6, 2016
CL https://golang.org/cl/20254 mentions this issue.
valyala commentedon Mar 6, 2016
Added yet another patch for detecting locks' copying inside composite literals:
valyala commentedon Mar 6, 2016
https://go-review.googlesource.com/20258
gopherbot commentedon Mar 6, 2016
CL https://golang.org/cl/20258 mentions this issue.
josharian commentedon Mar 7, 2016
Thanks for working on these. I left some comments and asked Rob to take over reviewing once they're addressed (that's what R=r means).
valyala commentedon Mar 13, 2016
@josharain, I updated the CL according to comments.
josharian commentedon Mar 13, 2016
Please ping the CL. (Just write a comment that says "Ping.") Feel free to repeat as needed. I'm leaving the remainder of the review to Rob.
valyala commentedon Jun 22, 2016
There is yet another case not covered by
cmd/vet
:Will create a CL for this case.
valyala commentedon Jun 22, 2016
See the CL
valyala commentedon Jun 23, 2016
Yet another case has been caught and covered by the CL mentioned above:
cmd/vet: check for copying of array of locks
gopherbot commentedon Dec 19, 2016
CL https://golang.org/cl/34630 mentions this issue.
cmd/vet: fix copylocks false positive on len(array) and cap(array).