Skip to content

maps: maps.Clone reference semantics when cloning a map with large value types [1.21 backport] #64475

Closed

Description

@gopherbot

@bcmills requested issue #64474 to be considered for backport to the next 1.21 minor release.

@gopherbot, please backport to Go 1.21. This appears to cause subtle aliasing bugs in cloned maps.

Activity

  1. added this to the Go1.21.5 milestone on Nov 30, 2023
  2. bcmills commented on Nov 30, 2023

    @bcmills
    Contributor

    (Note that the maps package was added in Go 1.21, so this does not also need to be backported to Go 1.20.)

  3. gopherbot commented on Dec 5, 2023

    @gopherbot
    ContributorAuthor

    Change https://go.dev/cl/547375 mentions this issue: [release-branch.go1.21] maps: fix aliasing problems with Clone

  4. modified the milestones: Go1.21.5, Go1.21.6 on Dec 5, 2023
  5. cagedmantis commented on Dec 6, 2023

    @cagedmantis
    Contributor

    Approved. It's a serious issue without a workaround.

  6. gopherbot commented on Jan 4, 2024

    @gopherbot
    ContributorAuthor

    Closed by merging f6b203c to release-branch.go1.21.

  7. added a commit that references this issue on Jan 4, 2024
    f6b203c
  8. locked and limited conversation to collaborators on Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CherryPickApprovedUsed during the release process for point releasesFrozenDueToAgecompiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions