Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: nil pointer in buildClosure #48225

Closed
korzhao opened this issue Sep 7, 2021 · 2 comments
Closed

cmd/compile: nil pointer in buildClosure #48225

korzhao opened this issue Sep 7, 2021 · 2 comments

Comments

@korzhao
Copy link
Contributor

@korzhao korzhao commented Sep 7, 2021

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

@ALTree ALTree added this to the Go1.18 milestone Sep 7, 2021
@thanm
Copy link
Contributor

@thanm thanm commented Sep 7, 2021

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 9, 2021

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

Loading

@gopherbot gopherbot closed this in c981874 Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants