Skip to content

cmd/compile: nil pointer in buildClosure #48225

@korzhao

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

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