Skip to content

cmd/compile: hash of unhashable type [4]int32 #65957

Closed

Description

@wdvxdr1123

Go version

gotip

Output of go env in your module/workspace:

GOARCH="arm64"
GOOS="darwin"

What did you do?

playground link: https://go.dev/play/p/WAX0OTneh60

What did you see happen?

panic: runtime error: hash of unhashable type [4]int32

goroutine 1 [running]:
main.main()
	/tmp/sandbox3460698193/prog.go:15 +0xc7

What did you expect to see?

no panic

Activity

  1. gopherbot commented on Feb 27, 2024

    @gopherbot
    Contributor

    Change https://go.dev/cl/567335 mentions this issue: cmd/compile: mark noalg for pointer to noalg type

  2. gopherbot commented on Feb 27, 2024

    @gopherbot
    Contributor

    Change https://go.dev/cl/567335 mentions this issue: cmd/compile: mark pointer to noalg type as noalg

  3. randall77 commented on Feb 27, 2024

    @randall77
    Contributor

    Here's a simpler reproducer: https://go.dev/play/p/NGky0OURi8R

  4. added a commit that references this issue on Feb 28, 2024
    b8c76ef
  5. wdvxdr1123 commented on Feb 28, 2024

    @wdvxdr1123
    ContributorAuthor

    I can reproduce with go1.21 and go1.22. Should we backport this fix?

  6. randall77 commented on Feb 28, 2024

    @randall77
    Contributor

    I'm on the fence. We only backport serious issues with no workaround, which I'm not sure this qualifies. It has been a bug since 1.18 and this is the first anyone has reported it. I'm not sure what a workaround might be, though. Does introducing a use of the array type in both packages work as a workaround?

    I'll open backports and we can discuss on those issues.

    @gopherbot please open backport issues. This issue may warrant backporting. It causes program crashing in some very particular circumstances. (Use of reflect.ArrayOf, and just the right use / nonuse of the corresponding language type in particular packages.)

  7. gopherbot commented on Feb 28, 2024

    @gopherbot
    Contributor

    Backport issue(s) opened: #65982 (for 1.21), #65983 (for 1.22).

    Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

  8. added this to the Go1.23 milestone on Feb 28, 2024
  9. added
    NeedsFixThe path to resolution is known, but the work has not been done.
    on Feb 28, 2024
  10. locked and limited conversation to collaborators on Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.compiler/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