Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: non-existent filename results in internal compiler error #17772

Closed
0xmohit opened this issue Nov 3, 2016 · 2 comments
Closed

cmd/compile: non-existent filename results in internal compiler error #17772

0xmohit opened this issue Nov 3, 2016 · 2 comments
Milestone

Comments

@0xmohit
Copy link
Contributor

0xmohit commented Nov 3, 2016

What did you do?

Accidentally issued go tool compile version instead of go tool compile -version.

What did you expect to see?

An error suggesting that no such file existed.

What did you see instead?

<unknown line number>: internal compiler error: syntax.ReadFile version: open version: no such file or directory

goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
        /home/mohit/tmp/t/go/src/runtime/debug/stack.go:24 +0x79
cmd/compile/internal/gc.Fatalf(0xa567e2, 0x16, 0xc4202edae0, 0x2, 0x2)
        /home/mohit/tmp/t/go/src/cmd/compile/internal/gc/subr.go:165 +0x226
cmd/compile/internal/gc.parseFile(0x7ffd2d582130, 0x7)
        /home/mohit/tmp/t/go/src/cmd/compile/internal/gc/noder.go:20 +0x242
cmd/compile/internal/gc.Main()
        /home/mohit/tmp/t/go/src/cmd/compile/internal/gc/main.go:311 +0x13f8
main.main()
        /home/mohit/tmp/t/go/src/cmd/compile/main.go:47 +0x15d

Does this issue reproduce with the latest release (go1.7.3)?

No.

System details

go version devel +62dafbb Thu Nov 3 15:04:59 2016 +0000 linux/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/home/mohit/tmp/t/go"
GOTOOLDIR="/home/mohit/tmp/t/go/pkg/tool/linux_amd64"
TERM="dumb"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build674393454=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
GOROOT/bin/go version: go version devel +62dafbb Thu Nov 3 15:04:59 2016 +0000 linux/amd64
GOROOT/bin/go tool compile -v: compile version devel +62dafbb Thu Nov 3 15:04:59 2016 +0000 X:framepointer
uname -sr: Linux 4.4.0-45-generic
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.1 LTS
Release:	16.04
Codename:	xenial
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.23-0ubuntu4) stable release version 2.23, by Roland McGrath et al.
gdb --version: GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
@griesemer griesemer added this to the Go1.8 milestone Nov 3, 2016
@griesemer
Copy link
Contributor

parseFile in noder.go must handle errors from syntax.ReadFile, not just panic.

@gopherbot
Copy link

CL https://golang.org/cl/32691 mentions this issue.

@golang golang locked and limited conversation to collaborators Nov 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants