diff mbox series

[libgo] : Use build.Default.Compiler in go/cmd/vet/types.goq

Message ID CAFULd4bDshA+EGHyTR5unq8xCZt4ZtEP=o871Q7hCLyBcEeAqQ@mail.gmail.com
State New
Headers show
Series [libgo] : Use build.Default.Compiler in go/cmd/vet/types.goq | expand

Commit Message

Uros Bizjak Dec. 4, 2018, 9:56 a.m. UTC
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.

Comments

Ian Lance Taylor Dec. 4, 2018, 2:29 p.m. UTC | #1
On Tue, Dec 4, 2018 at 1:56 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
> 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.

Thanks.  Committed to mainline.

Ian
diff mbox series

Patch

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)