-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/cgo: cgo pointer checking issue with struct fields #25941
Comments
/cc @ianlancetaylor |
This is a bug that should be fixed some day. The problem is that the conversion to |
I was examining / thinking how to fix it. What if it were to unwrap So, instead of generating:
It would generate:
The same goes for the Thoughts? |
Probably only in cases when ptype itself is a pointer. Because it still would need to check |
Change https://golang.org/cl/119976 mentions this issue: |
Change https://golang.org/cl/120615 mentions this issue: |
Change https://golang.org/cl/142884 mentions this issue: |
Issue: go 1.10.2 and current go tip (b7d9e6e).
Machine: darwin/amd64
When you use a pointer inside to another struct with pointers when calling C then CGO check fails with "panic: runtime error: cgo argument has Go pointer to Go pointer".
Possibly related to #14210
Code to reproduce:
The text was updated successfully, but these errors were encountered: