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

unsafe usage of reflect.SliceHeader #132

Open
hajimehoshi opened this issue Feb 14, 2021 · 0 comments
Open

unsafe usage of reflect.SliceHeader #132

hajimehoshi opened this issue Feb 14, 2021 · 0 comments

Comments

@hajimehoshi
Copy link
Member

https://github.com/go-gl/gl/blob/master/v2.1/gl/conversions.go#L94-L106

Go1.16's go vet warns this reflect.SliceHeader usage. See also https://golang.org/pkg/unsafe/

In general, reflect.SliceHeader and reflect.StringHeader should be used only as *reflect.SliceHeader and *reflect.StringHeader pointing at actual slices or strings, never as plain structs. A program should not declare or allocate variables of these struct types.

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

No branches or pull requests

1 participant