Skip to content

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

Closed
@aclements

Description

@aclements

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions