Skip to content

vet: copylock check doesn't detect certain copies #14664

Closed
@valyala

Description

@valyala

copylock check must emit a warning on copying sync.Mutex or struct containing sync.Mutex. It doesn't detect the following cases:

        var a sync.Mutex
        b := a   // doesn't detect
        var c = a  // doesn't detect
        b = a  // detects

See #8005 for details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions