Skip to content

cmd/compile: nil deref #24447

Description

@dvyukov

go version devel +b61b1d2c57 Sun Mar 18 16:53:53 2018 +0000 linux/amd64

package n
type R interface{S}
type S=interface{R}

go build crash.go

panic: runtime error: invalid memory address or nil pointer dereference

goroutine 1 [running]:
cmd/compile/internal/gc.dowidth()
cmd/compile/internal/types.(*Type).Fields()
cmd/compile/internal/gc.expandiface()
cmd/compile/internal/gc.dowidth()
cmd/compile/internal/types.(*Type).Fields()
cmd/compile/internal/gc.expandiface()
cmd/compile/internal/gc.dowidth()
cmd/compile/internal/gc.resumecheckwidth()
cmd/compile/internal/gc.Main()
main.main()

Found with go-fuzz. #19109

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions