golang / go

The Go programming language

Home Page:https://go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmd/compile: not-deterministic output

dvyukov opened this issue · comments

cmd/compile fails on the following program printing current time, which makes output non-deterministic and not amenable for automatic checking. Also a line number would be nice.

Program in hex:

00000000  70 61 63 6b 61 67 65 20  70 0a 0a 66 75 6e 63 20  |package p..func |
00000010  ef ef 0a                                          |...|

output of go tool compile:

2015/11/16 14:09:06 getc: peeking: EOF

go version devel +25a28da Sun Nov 15 23:41:28 2015 +0000 linux/amd64

This is unrelated to the new parser.

More generally, there's a question as to what to do with this and other fatal errors in the compiler.

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

Filed a fix for this particular issue (https://go-review.googlesource.com/17047). Filed a separate issue #13320 for log.Fatal calls.