Skip to content

sst: fix usage of unsafe.Pointer - #207

Merged
askervin merged 1 commit into
intel:mainfrom
marquiz:devel/sst-unsafe-ptr
Sep 15, 2026
Merged

askervin merged 1 commit into
intel:mainfrom
marquiz:devel/sst-unsafe-ptr

Conversation

@marquiz

@marquiz marquiz commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Fix usage if unsafe.Pointer with the ioctl calls. We converted a unsafe.Pointer to uintptr (a plain integer) early on, which opened the possibility for the garbage collector to move/invalidate the value before the syscall was finished. The syscall case is explicitly mentioned in the unsafe.Pointer documentation, see usage patter (4) in: https://pkg.go.dev/unsafe#Pointer

Fix usage if unsafe.Pointer with the ioctl calls. We converted a
unsafe.Pointer to uintptr (a plain integer) early on, which opened the
possibility for the garbage collector to move/invalidate the value
before the syscall was finished. The syscall case is explicitly
mentioned in the unsafe.Pointer documentation, see usage patter (4) in:
https://pkg.go.dev/unsafe#Pointer

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
@marquiz
marquiz requested review from kad and klihub September 14, 2026 07:09
@klihub
klihub requested a review from askervin September 14, 2026 18:31

@askervin askervin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@askervin
askervin merged commit bdbefa8 into intel:main Sep 15, 2026
6 checks passed
@marquiz
marquiz deleted the devel/sst-unsafe-ptr branch September 15, 2026 13:27
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.

3 participants