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

Use unsafe.Slice in Memory.UnsafeData #200

Merged
merged 2 commits into from
Oct 31, 2023

Conversation

guregu
Copy link
Contributor

@guregu guregu commented Oct 31, 2023

Go 1.17 added unsafe.Slice, which avoids the 32-bit overflow issue mentioned in #199. I believe this also lets us use memories larger than 4GB (for future wasm64 stuff).

@guregu
Copy link
Contributor Author

guregu commented Oct 31, 2023

Hmm, not sure why the bazel build is failing:

__main__/memory.go:60:9: undefined: unsafe.Slice

It must be using an old version of Go. unsafe.Slice was added in 1.17.

@guregu
Copy link
Contributor Author

guregu commented Oct 31, 2023

Bumped io_bazel_rules_go to its latest version (which has Go 1.21.1), let me know if you'd prefer a different approach.

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexcrichton alexcrichton merged commit 650f03f into bytecodealliance:main Oct 31, 2023
9 checks passed
@guregu guregu deleted the unsafe-slice branch October 31, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants