public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, libgo]: Use build.Default.Compiler in go/cmd/vet/types.goq
@ 2018-12-04  9:56 Uros Bizjak
  2018-12-04 14:29 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Uros Bizjak @ 2018-12-04  9:56 UTC (permalink / raw)
  To: gcc-patches; +Cc: Ian Taylor, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

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.

[-- Attachment #2: g.diff.txt --]
[-- Type: text/plain, Size: 353 bytes --]

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, libgo]: Use build.Default.Compiler in go/cmd/vet/types.goq
  2018-12-04  9:56 [PATCH, libgo]: Use build.Default.Compiler in go/cmd/vet/types.goq Uros Bizjak
@ 2018-12-04 14:29 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2018-12-04 14:29 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: gcc-patches, gofrontend-dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-04 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04  9:56 [PATCH, libgo]: Use build.Default.Compiler in go/cmd/vet/types.goq Uros Bizjak
2018-12-04 14:29 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).