Without this patch go tool vet segfaults on alpha due to unknown
architecture for gc compiler:

go tool vet: exit status 2
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=1 addr=24 pc=4832064492]

goroutine 1 [running]:
panic
        /space/homedirs/uros/gcc-svn/trunk/libgo/go/runtime/panic.go:588

Attached patch fixes the segfault.

Uros.
Index: go/cmd/vet/types.go
===================================================================
--- go/cmd/vet/types.go (revision 266733)
+++ go/cmd/vet/types.go (working copy)
@@ -310,4 +310,4 @@
        return true
 }
 
-var archSizes = types.SizesFor("gc", build.Default.GOARCH)
+var archSizes = types.SizesFor(build.Default.Compiler, build.Default.GOARCH)

Reply via email to