-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-WindowsPerformancecompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
go version go1.19.5 linux/amd64
go version devel go1.20-76d39ae349 Tue Jan 10 20:34:22 2023 +0000 linux/amd64
package p
import "os"
func f() {
os.Stdout.Write([]byte{'h', 'e', 'l', 'l', 'o'})
}
Linux:
$ GOOS=linux gotip build -gcflags=-m test.go
./test.go:5:6: can inline f
./test.go:6:24: []byte{...} does not escape <<<<
Windows:
$ GOOS=windows gotip build -gcflags=-m test.go
./test.go:5:6: can inline f
./test.go:6:24: []byte{...} escapes to heap <<<<
Read is also affected.
Reproducible on tip and 1.19.5.
Related to #41474
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-WindowsPerformancecompiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.