-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
Milestone
Description
The following program faults on ppc64le
http://play.golang.org/p/hRlQs7hss2
package main
type APIEndpoint struct {
Addresses []string
Hostnames []string
CACert string
EnvironUUID string
ServerUUID string
}
type Base struct {
name string
}
func (b *Base) ConnectionEndpoint() (APIEndpoint, error) {
return APIEndpoint{}, nil
}
type Super struct {
Base
}
type T interface {
ConnectionEndpoint() (APIEndpoint, error)
}
func main() {
var q T = new(Super)
q.ConnectionEndpoint()
}
% go run x.go
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x11208]
goroutine 1 [running]:
main.(*Super).ConnectionEndpoint(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
<autogenerated>:1 +0x48
main.main()
/home/ubuntu/src/x/x.go:29 +0x9c
exit status 2
The program does not fault on any other architecture.
/cc @rsc @aclements @minux