Skip to content

cmd/compile: nil pointer in buildClosure #48225

Closed

Description

@korzhao

What version of Go are you using (go version)?

$ go version
go version devel go1.18

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

package main

type Foo[T any] struct {
}

func (foo Foo[T]) Get()  {
}

var(
     _ = Foo[[]string]{}.Get
)

func main() {
}

What did you expect to see?

What did you see instead?

[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0x17c49ff]

goroutine 1 [running]:
cmd/compile/internal/noder.(*irgen).buildClosure(0xc0002fa200, 0x0, {0x1a63778, 0xc0003c2300})
        /Users/kezhao/google/go/src/cmd/compile/internal/noder/stencil.go:405 +0xc7f

@danscales

Activity

  1. added
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    on Sep 7, 2021
  2. added this to the Go1.18 milestone on Sep 7, 2021
  3. thanm commented on Sep 7, 2021

    @thanm
    Contributor
  4. gopherbot commented on Sep 9, 2021

    @gopherbot
    Contributor

    Change https://golang.org/cl/348512 mentions this issue: cmd/compile: fix implement for closure in a global assignment

  5. locked and limited conversation to collaborators on Sep 9, 2022
  6. added a commit that references this issue on Apr 29, 2024
    c981874
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

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions