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

unsafe.Slice for go1.18 #178

Closed
visualfc opened this issue Aug 28, 2022 · 0 comments · Fixed by #179
Closed

unsafe.Slice for go1.18 #178

visualfc opened this issue Aug 28, 2022 · 0 comments · Fixed by #179
Labels
enhancement New feature or request

Comments

@visualfc
Copy link
Member

$GOROOT/test/unsafebuiltins.go

// sliced memory overflows address space
last := (*byte)(unsafe.Pointer(^uintptr(0)))
_ = unsafe.Slice(last, 1)
mustPanic(func() { _ = unsafe.Slice(last, 2) })
@visualfc visualfc added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant