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
It seems like the openapiv2 and openapiv3 codebases include generated code that violates the Go copylock code analysis. (That code analysis checks to make sure that sync.Mutex is used with a pointer and isn't copied by value, rendering it unable to protect data.)
That code seems to be generated, so it might be a bug in the generator (I believe protoc-gen-go includes those sync.Mutex's explicitly to keep MessageState from being copied like this).
The errors look like:
openapiv2/OpenAPIv2.go:5872:10: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv2.JsonReference contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
openapiv2/OpenAPIv2.go:6248:11: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv2.ParametersItem contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
openapiv2/OpenAPIv2.go:6268:10: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv2.PathItem contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
openapiv2/OpenAPIv2.go:6542:11: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv2.ResponseValue contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
openapiv2/OpenAPIv2.go:6584:10: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv2.Schema contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
and
openapiv3/OpenAPIv3.go:6085:10: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv3.PathItem contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
openapiv3/OpenAPIv3.go:6213:10: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv3.Reference contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
The text was updated successfully, but these errors were encountered:
It seems like the openapiv2 and openapiv3 codebases include generated code that violates the Go copylock code analysis. (That code analysis checks to make sure that sync.Mutex is used with a pointer and isn't copied by value, rendering it unable to protect data.)
That code seems to be generated, so it might be a bug in the generator (I believe protoc-gen-go includes those sync.Mutex's explicitly to keep MessageState from being copied like this).
The errors look like:
and
The text was updated successfully, but these errors were encountered: