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

invalid use of unsafe.Pointer #18

Closed
Wessie opened this issue May 1, 2015 · 2 comments
Closed

invalid use of unsafe.Pointer #18

Wessie opened this issue May 1, 2015 · 2 comments

Comments

@Wessie
Copy link

Wessie commented May 1, 2015

The following code https://github.com/go-gl/gl/blob/master/v3.3-core/gl/conversions.go#L42-47 is invalid because it puts a non-pointer value into a pointer-type, if the GC finds this non-pointer it will crash the program, as can be demonstrated by forcing a GC run while the return value is live https://play.golang.org/p/XslLV2Vpqk

@dmitshur
Copy link
Member

dmitshur commented May 1, 2015

I think this is somewhat related to go-gl/glow#11, but possibly an easier problem to fix.

Thanks for the reproducible sample code.

@Wessie
Copy link
Author

Wessie commented May 1, 2015

taking a look through the glow issue list, this is actually the same as this old issue mentioned there go-gl/glfw#78, I probably should've filed it under the glow repository instead.

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

2 participants