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

syscall: introduce IoctlPtr for exec_unix tests #58609

Closed
dmgk opened this issue Feb 20, 2023 · 2 comments
Closed

syscall: introduce IoctlPtr for exec_unix tests #58609

dmgk opened this issue Feb 20, 2023 · 2 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@dmgk
Copy link
Member

dmgk commented Feb 20, 2023

This is a followup for #44834. Similar issue is present in exec_unix_test.go, which calls sysctl.Ioctl() and passes Go pointers as uintptr, violating unsafe.Pointer safety rules. As sysctl.Ioctl() is exported solely for tests (and called only by exec_unix_test.go), replace it with sysctl.IoctlPtr() that accepts arg argument as unsafe.Pointer.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Feb 20, 2023
@gopherbot
Copy link

Change https://go.dev/cl/469675 mentions this issue: syscall: introduce IoctlPtr for exec_unix tests

@ianlancetaylor
Copy link
Contributor

Thanks. If you are going to send a patch, it's not necessary to open an issue.

@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure. labels Feb 21, 2023
@bcmills bcmills added this to the Go1.21 milestone Feb 21, 2023
johanbrandhorst pushed a commit to Pryz/go that referenced this issue Feb 22, 2023
Avoid passing Go pointers as uintptr in exec_unix_test.go by introducing
syscall.IoctlPtr() which accepts arg as unsafe.Pointer.

For golang#44834
Fixes golang#58609

Change-Id: I6d0ded023e5f3c9989783aee7075bb88100d9ec2
Reviewed-on: https://go-review.googlesource.com/c/go/+/469675
Run-TryBot: Dmitri Goutnik <dgoutnik@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

4 participants