Skip to content

change entry to use unsafe.Pointer instead of atomic.Pointer[V] - #2

Merged
danp merged 1 commit into
mainfrom
checkptr-fix
Jan 9, 2026
Merged

change entry to use unsafe.Pointer instead of atomic.Pointer[V]#2
danp merged 1 commit into
mainfrom
checkptr-fix

Conversation

@danp

@danpdanp commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

The expunged sentinel is 16 bytes, allocated as new(any).

If V is larger than that, casting expunged to *V triggers checkptr
violations since extra memory is referenced.

Using unsafe.Pointer lets us just compare pointer values without the
casting.

The expunged sentinel is 16 bytes, allocated as new(any).
If V is larger than that, casting expunged to *V triggers checkptr
violations since extra memory is referenced.
Using unsafe.Pointer lets us just compare pointer values without the
casting.
@danp
danp requested a review from yonderblueJanuary 8, 2026 14:19
@danp
danp merged commit a37083a into mainJan 9, 2026
4 checks passed
@danp
danp deleted the checkptr-fix branch January 9, 2026 17:45
Sign up for freeto 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

@danp@yonderblue