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

x/exp/mmap: missing windows/arm64 support #49106

yselkowitz opened this issue Oct 22, 2021 · 0 comments

x/exp/mmap: missing windows/arm64 support #49106

yselkowitz opened this issue Oct 22, 2021 · 0 comments


Copy link

@yselkowitz yselkowitz commented Oct 22, 2021

What version of Go are you using (go version)?

$ go1.17.2 version
go version go1.17.2 linux/amd64

Does this issue reproduce with the latest release?


What operating system and processor architecture are you using (go env)?

go env Output
$ go1.17.2 env

What did you do?

I was trying to port to windows/arm64, and this came up as a missing indirect dependency. But as a simple test case to illustrate the issue:

$ echo abcdefg > tmp.txt
$ cat main.go 
package main

import (

func main() {
	at, _ := mmap.Open("./tmp.txt")
	buff := make([]byte, 2)
	_, _ = at.ReadAt(buff, 4)
	_ = at.Close()

$ go1.17.2 mod init
go: creating new go.mod: module $PWD/test
go: to add module requirements and sums:
	go mod tidy
$ go1.17.2 mod tidy
go: finding module for package
go: found in v0.0.0-20211012155715-ffe10e552389
$ go1.17.2 build .
$ GOOS=windows GOARCH=amd64 go1.17.2 build .
$ GOOS=windows GOARCH=arm64 go1.17.2 build .

What did you expect to see?

Code compiles, creating an ARM64 test.exe

What did you see instead?

$HOME/go/pkg/mod/ [maxBytes]byte used as value
$HOME/go/pkg/mod/ undefined: maxBytes


AFAICS the fix would be to add a mmap_windows_arm64.go file matching the contents of mmap_windows_amd64.go in

@gopherbot gopherbot added this to the Unreleased milestone Oct 22, 2021
yselkowitz added a commit to multi-arch/oc that referenced this issue Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants