Skip to content

cmd/compile: internal compiler error: missing typecheck [1.19 backport] #56744

Closed

Description

@gopherbot

@randall77 requested issue #56727 to be considered for backport to the next 1.19 minor release.

@gopherbot please open a backport issue for 1.19.

Activity

  1. added
    CherryPickCandidateUsed during the release process for point releases
    compiler/runtimeIssues related to the Go compiler and/or runtime.
    on Nov 15, 2022
  2. added this to the Go1.19.4 milestone on Nov 15, 2022
  3. gopherbot commented on Nov 16, 2022

    @gopherbot
    ContributorAuthor

    Change https://go.dev/cl/451155 mentions this issue: [release-branch.go1.19] cmd/compile: fix missing typecheck for static initialization slice

  4. dmitshur commented on Nov 16, 2022

    @dmitshur
    Member

    https://go.dev/wiki/MinorReleases includes:

    The issue should include [...] and a short rationale about why the backport might be needed.

    @randall77 Can you please add a rationale for why this backport should be made? It's needed for the cherry-pick review process to make progress. Thanks.

  5. randall77 commented on Nov 16, 2022

    @randall77
    Contributor

    Some static initialization code causes the compiler to crash.
    (This issue is a fix-to-the-fix for #56105, which has already been backported.)

  6. cherrymui commented on Nov 23, 2022

    @cherrymui
    Member

    We discussed with the release team, and we think we don't know exactly the importance and safety for this backport. Could the compiler team give more input to make the decision? Thanks.

  7. randall77 commented on Nov 23, 2022

    @randall77
    Contributor

    This backport I would describe as mildly important. Without it there would be some static initialization code that causes the compiler to crash. It isn't common, but it isn't fuzz-generated either. Real people have run into it. I suspect it is not too hard to work around.
    The fix for #56105 was for the same underlying issue, but was incomplete. This issue+CL fixes that incompleteness.

    The backport is very safe. It just does some extra typechecking.

  8. cherrymui commented on Nov 23, 2022

    @cherrymui
    Member

    Thanks.

    As #56727 (comment) mentioned, this issue was not in Go 1.19.2 but caused by a backport of #56105 in 1.19.3. I guess another option would be reverting that backport. The input in #56105 does look a bit contrived. The concern here is that the backport of #56105 has caused a chain of more issues and backports. How would that sound? Thanks.

  9. randall77 commented on Nov 23, 2022

    @randall77
    Contributor

    Yes, the other option is to revert the fix for #56106. That seems ok to me. The test case for that issue is certainly more contrived than this one.

    There's an outside chance that reverting the fix for #56106 leaves open the possibility of incorrectly compiled code instead of an ICE. But if it is possible it is certainly very rare.

  10. cuonglm commented on Nov 24, 2022

    @cuonglm
    Member

    I'm still leaning to backport theses.

    Isn't that without #56106, people won't be able to use fuzzing?

  11. aclements commented on Nov 30, 2022

    @aclements
    Member

    I think we should go ahead with the backport. The backport fix is very safe (doing an unnecessary typecheck is a no-op), and can't make the situation worse. Whereas, as Keith pointed out, there's some chance that reverting the original fix reintroduces a miscompilation, which is much worse than an ICE. On balance, I support landing the backport.

  12. modified the milestones: Go1.19.4, Go1.19.5 on Dec 6, 2022
  13. gopherbot commented on Dec 9, 2022

    @gopherbot
    ContributorAuthor

    Closed by merging 926ffba to release-branch.go1.19.

  14. added a commit that references this issue on Dec 9, 2022
    926ffba
  15. locked and limited conversation to collaborators on Dec 9, 2023
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