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

reflect: audit all unsafe.Pointer(x + off) uses #21733

Closed
aclements opened this issue Sep 1, 2017 · 1 comment
Closed

reflect: audit all unsafe.Pointer(x + off) uses #21733

aclements opened this issue Sep 1, 2017 · 1 comment
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@aclements
Copy link
Member

We've had multiple issues with reflect constructing past-the-end pointers when zero-sized types are involved, mostly in the function call paths (most recently: #21717).

I'm not sure we've ever systematically audited all of the pointer constructions for this bug, and a quick search reveals several that look suspect.

If we find any actual bugs, the fixes should get backported to 1.9.x.

It may be easier to build tests for these if we address #21730 first.

/cc @cherrymui @bcmills

@aclements aclements modified the milestones: Go1.10, Go1.9.1 Sep 1, 2017
@rsc rsc modified the milestones: Go1.9.1, Go1.9.2 Oct 4, 2017
@ianlancetaylor ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 13, 2017
@rsc rsc modified the milestones: Go1.9.2, Go1.10 Oct 13, 2017
@gopherbot
Copy link

Change https://golang.org/cl/80738 mentions this issue: reflect: audit and explain safety of all unsafe.Pointer additions

@golang golang locked and limited conversation to collaborators Dec 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants