Skip to content

all: use reflect.StringHeader and reflect.SliceHeader for pointer conversions #37805

@smasher164

Description

@smasher164

As @mdempsky states in #19367 (comment),

It's not guaranteed that you can convert a pointer to a slice to a pointer to any other struct type except reflect.SliceHeader.

Therefore, the following conversions in the golang subrepos (except runtime and reflect) should be modified to use reflect.StringHeader and reflect.SliceHeader when converting between an unsafe.Pointer and a string/slice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions