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

runtime: cgo check ignores type's ptrdata field #14508

Closed
ianlancetaylor opened this issue Feb 25, 2016 · 4 comments
Closed

runtime: cgo check ignores type's ptrdata field #14508

ianlancetaylor opened this issue Feb 25, 2016 · 4 comments
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

The cgo check code in cgoCheckTypedBlock in runtime/cgocheck.go, in the case where kindGCProg is not set, ignores the type's ptrdata field. It assumes that the gcdata field is valid for the entire size of the type. I think this means that in some cases cgoCheckTypedBlock might mistake a non-pointer value for a pointer, potentially triggering an incorrect panic.

@ianlancetaylor ianlancetaylor self-assigned this Feb 25, 2016
@ianlancetaylor ianlancetaylor added this to the Go1.6.1 milestone Feb 25, 2016
@bradfitz bradfitz modified the milestones: Go1.6.1, Go1.6.2 Apr 7, 2016
@rsc
Copy link
Contributor

rsc commented Apr 7, 2016

No actual failure here. While I certainly believe you, maybe this can wait until it happens and be in Go 1.6.3.

@rsc rsc added the Release-OK label Apr 7, 2016
@adg adg modified the milestones: Go1.6.3, Go1.6.2 Apr 19, 2016
@adg adg removed the Release-OK label Apr 19, 2016
@gopherbot
Copy link

CL https://golang.org/cl/23224 mentions this issue.

@broady
Copy link
Member

broady commented Jul 18, 2016

@ianlancetaylor do we want this in Go 1.6.3? It hasn't been cherry-picked.

@ianlancetaylor
Copy link
Contributor Author

We don't want this in 1.6.3. Changing the milestone.

@ianlancetaylor ianlancetaylor modified the milestones: Go1.7, Go1.6.3 Jul 18, 2016
@golang golang locked and limited conversation to collaborators Jul 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants