Skip to content

cmd/compile: incorrect type set intersection computation [1.18 backport] #57498

Closed as not planned

Description

@gopherbot

@griesemer requested issue #57486 to be considered for backport to the next 1.18 minor release.

This is now fixed (but not yet submitted). As @ianlancetaylor correctly noted, this should not have worked with Go 1.18 or Go 1.19.

@gopherbot please consider this for backport to 1.18 and 1.19. This is a compiler bug.

Activity

  1. added
    CherryPickCandidateUsed during the release process for point releases
    compiler/runtimeIssues related to the Go compiler and/or runtime.
    on Dec 28, 2022
  2. added this to the Go1.18.10 milestone on Dec 28, 2022
  3. changed the title [-]cmd/compile: incorrectly allow to use a type parameter as type argument (not very sure it is a bug or not) [1.18 backport][/-] [+]cmd/compile: incorrect type set intersection computation [1.18 backport][/+] on Dec 28, 2022
  4. gopherbot commented on Dec 29, 2022

    @gopherbot
    ContributorAuthor

    Change https://go.dev/cl/460015 mentions this issue: [release-branch.go1.18] go/types, types2: use strict comparability for type set intersection

  5. griesemer commented on Jan 4, 2023

    @griesemer
    Contributor

    The primary reason for backporting would be for people who cannot (or don't want to) move to 1.20. People using 1.18 and and 1.19 can write code that the compiler accepts but that is in fact incorrect (though I don't have a simple example where such incorrectly compiled code can be used to exploit something - it'll take some ingenuity to find such an example).

    The actual fix in the type checker is extremely straight-forward - most of the rest of the CL is simply for the test cases. I'm not worried too much about collateral damage.

    My take: if there's no more point release for 1.18 and 1.19, then let's not do this. If there are point releases for other reasons, then let's include this fix.

  6. modified the milestones: Go1.18.10, Go1.18.11 on Jan 10, 2023
  7. heschi commented on Jan 18, 2023

    @heschi
    Contributor

    We aren't going to do another minor release for 1.18. Closing this one.

  8. locked and limited conversation to collaborators on Mar 2, 2024
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

    CherryPickCandidateUsed 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