Closed
Description
What version of Go are you using (go version
)?
$ go version go version go1.19.6 linux/amd64 and $ go version go version go1.20.1 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
linux/amd64
What did you do?
Test file foo.go
:
package main
import (
"fmt"
"os"
)
func main() {
s, err := os.Stat("foo.go")
if err != nil {
fmt.Println(err)
}
fmt.Printf("%#v\n", s)
}
On system with Go 1.19.6:
$ GOOS=freebsd go build foo.go
$ scp foo <freebsd machine>:foo.19
On system with Go 1.20.1:
$ GOOS=freebsd go build foo.go
$ scp foo <freebsd machine>:foo.20
From either system:
$ scp foo.go <freebsd machine>:
On FreeBSD system:
$ ./foo.19
...
$ ./foo.20
What did you expect to see?
Same (or at least very similar) output
What did you see instead?
$ ./foo.19
&os.fileStat{name:"foo.go", size:175, mode:0x1a4, modTime:time.Time{wall:0x7d8ca00, ext:63813798690, loc:(*time.Location)(0x53d360)}, sys:syscall.Stat_t{Dev:0x3a00ff6c, Ino:0x4aebd51, Nlink:0x1, Mode:0x81a4, Padding0:0, Uid:0x257, Gid:0x7e, Padding1:0, Rdev:0x0, Atimespec:syscall.Timespec{Sec:1678201603, Nsec:752772000}, Mtimespec:syscall.Timespec{Sec:1678201890, Nsec:131648000}, Ctimespec:syscall.Timespec{Sec:1678201890, Nsec:131648000}, Birthtimespec:syscall.Timespec{Sec:-1, Nsec:0}, Size:175, Blocks:8, Blksize:4096, Flags:0x0, Gen:0x0, Spare:[10]uint64{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}}
$ ./foo.20
stat foo.go: function not implemented
<nil>
$