Skip to content

cmd/compile: race detector detects race with close(chan) and len(chan) [1.11 backport] #27778

@randall77

Description

@randall77

Considering backporting the fix for #27070 to 1.11.

This was an issue introduced in 1.11. The race detector reported a race between close(chan) and len(chan), where previously (in 1.10) it didn't.

The spec is silent on this issue, so it's technically ok to report a race here, but consensus was that it was worth fixing. But is it worth backporting?
The fix is pretty simple. https://go-review.googlesource.com/c/go/+/135698

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions