You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go run loader.go
/home/pi/src/foo/foo.go:10:8: MaxInt (untyped int constant 9223372036854775807) overflows uint32
2018/07/07 12:09:36 couldn't load packages due to errors: foo
exit status 1
What did you expect to see?
No output.
What did you see instead?
The error above and a non-zero exit status.
The text was updated successfully, but these errors were encountered:
There is no error if you instruct it to use sizes for arm explicitly, however: https://play.golang.org/p/tYNZ4VEkCOw (or any other platform with a 4-byte word size).
If you don't set an explicit Size in the typechecker config, go/types uses SizesFor("gc", "amd64") regardless of the platform it's running on, hence the overflow.
What version of Go are you using (
go version
)?go version go1.10.3 linux/arm
Does this issue reproduce with the latest release?
This is not feasible to test.
What operating system and processor architecture are you using (
go env
)?GOARCH="arm"
GOOS="linux"
What did you do?
Run go/loader to load a package on an arm device.
The package in foo makes reference to the size of
int
.This is a valid Go program;
but running the loader program above results in
What did you expect to see?
No output.
What did you see instead?
The error above and a non-zero exit status.
The text was updated successfully, but these errors were encountered: